ExBifrost.Api.OpenAIIntegration (ex_bifrost v0.1.0)

Copy Markdown View Source

API calls for all endpoints tagged OpenAIIntegration.

Summary

Functions

Create chat completion (Azure OpenAI) Creates a chat completion using Azure OpenAI deployment.

Create image (Azure OpenAI) Generates images from text prompts using Azure OpenAI deployment.

Cancel batch job (OpenAI format) Cancels a batch processing job. Note: This endpoint also works without the /v1 prefix (e.g., /openai/batches/{batch_id}/cancel).

Count input tokens Counts the number of tokens in a Responses API request.

Create batch job (OpenAI format) Creates a batch processing job. Note: This endpoint also works without the /v1 prefix (e.g., /openai/batches).

Create chat completion (OpenAI format) Creates a chat completion using OpenAI-compatible format. Supports streaming via SSE. Async inference: Send x-bf-async: true to submit the request as a background job and receive a job ID immediately. Poll with x-bf-async-id: <job-id> to retrieve the result. When the job is still processing, the response will have an empty choices array. When completed, choices will contain the full result. See Async Inference for details. Note: This endpoint also works without the /v1 prefix (e.g., /openai/chat/completions).

Compact context (OpenAI) Compresses a conversation into an opaque compaction item using the OpenAI-compatible /v1/responses/compact endpoint. Drop-in compatible with the OpenAI SDK. The response output contains the user messages plus a final item with type: "response.compaction" and encrypted_content. Pass this output as input to future Responses API calls to continue the conversation using the compacted context. Note: This endpoint also works without the /v1 prefix (e.g., /openai/responses/compact).

Create container (OpenAI format) Creates a new container for storing files and data. Note: This endpoint also works without the /v1 prefix (e.g., /openai/containers).

Create file in container (OpenAI format) Creates a new file in a container. You can either upload file content directly via multipart/form-data or reference an existing file by its ID. Note: This endpoint also works without the /v1 prefix (e.g., /openai/containers/{container_id}/files).

Create embeddings (OpenAI format) Creates embedding vectors for the input text. Note: This endpoint also works without the /v1 prefix (e.g., /openai/embeddings).

Create image Generates images from text prompts using OpenAI-compatible format. Note: Azure OpenAI deployments are also supported via the Azure integration endpoint. Note: This endpoint also works without the /v1 prefix (e.g., /openai/images/generations).

Create response (OpenAI Responses API) Creates a response using OpenAI Responses API format. Supports streaming via SSE. Async inference: Send x-bf-async: true to submit the request as a background job and receive a job ID immediately. Poll with x-bf-async-id: <job-id> to retrieve the result. When the job is still processing, the response status will not be completed. When completed, the full response with output_text will be returned. See Async Inference for details. Note: This endpoint also works without the /v1 prefix (e.g., /openai/responses).

Create speech (OpenAI TTS) Generates audio from text using OpenAI TTS. Supports streaming via SSE when stream_format is set to 'sse'. Note: This endpoint also works without the /v1 prefix (e.g., /openai/audio/speech).

Create text completion (OpenAI format) Creates a text completion using OpenAI-compatible format. This is the legacy completions API. Note: This endpoint also works without the /v1 prefix (e.g., /openai/completions).

Create transcription (OpenAI Whisper) Transcribes audio into text using OpenAI Whisper. Note: This endpoint also works without the /v1 prefix (e.g., /openai/audio/transcriptions).

Create a video generation Submits a video generation job using OpenAI's Videos API. The request is multipart/form-data and may include reference images.

Delete container (OpenAI format) Deletes a container. Note: This endpoint also works without the /v1 prefix (e.g., /openai/containers/{container_id}).

Delete file from container (OpenAI format) Deletes a file from a container. Note: This endpoint also works without the /v1 prefix (e.g., /openai/containers/{container_id}/files/{file_id}).

Delete file (OpenAI format) Deletes an uploaded file. Note: This endpoint also works without the /v1 prefix (e.g., /openai/files/{file_id}).

Delete a video generation Deletes a previously generated video.

Download generated video content Streams the binary video bytes for a completed generation job.

Get file content from container (OpenAI format) Downloads the content of a file from a container. Note: This endpoint also works without the /v1 prefix (e.g., /openai/containers/{container_id}/files/{file_id}/content).

Get file content (OpenAI format) Retrieves the content of an uploaded file. Note: This endpoint also works without the /v1 prefix (e.g., /openai/files/{file_id}/content).

List batch jobs (OpenAI format) Lists batch processing jobs. Note: This endpoint also works without the /v1 prefix (e.g., /openai/batches).

List files in container (OpenAI format) Lists all files in a container. Note: This endpoint also works without the /v1 prefix (e.g., /openai/containers/{container_id}/files).

List containers (OpenAI format) Lists containers for a provider. Note: This endpoint also works without the /v1 prefix (e.g., /openai/containers).

List files (OpenAI format) Lists uploaded files. Note: This endpoint also works without the /v1 prefix (e.g., /openai/files).

List models (OpenAI format) Lists available models in OpenAI format. Note: This endpoint also works without the /v1 prefix (e.g., /openai/models).

List video generations Lists previously submitted video generation jobs.

WebRTC Realtime SDP exchange (OpenAI alias) OpenAI-prefixed alias of POST /v1/realtime/calls. Performs the WebRTC SDP exchange for OpenAI Realtime calls. Accepts either multipart form data with sdp + session parts (GA) or a raw SDP body (legacy).

Create realtime client secret (OpenAI alias) OpenAI-prefixed alias of POST /v1/realtime/client_secrets. Mints an ephemeral client secret used to authorize a downstream Realtime client.

Create realtime session (OpenAI alias) OpenAI-prefixed alias of POST /v1/realtime/sessions. Creates a pre-configured realtime session that can be joined by clients.

WebSocket Realtime (OpenAI alias) OpenAI-prefixed alias of GET /v1/realtime. WebSocket upgrade endpoint for OpenAI Realtime; selects the model via the model query parameter (Azure GA) or deployment (preview).

Remix an existing video Creates a new generation by remixing a prior video with new prompt parameters.

WebSocket Responses (OpenAI alias) WebSocket upgrade endpoint for the Responses API. Mirrors the canonical GET /v1/responses WS endpoint; the OpenAI-prefixed path is selected when the request includes an Upgrade: websocket header. Authentication accepts the same headers as the inference HTTP surface plus the openai-insecure-api-key.<key> subprotocol fallback.

Retrieve batch job (OpenAI format) Retrieves details of a batch processing job. Note: This endpoint also works without the /v1 prefix (e.g., /openai/batches/{batch_id}).

Retrieve container (OpenAI format) Retrieves a specific container by ID. Note: This endpoint also works without the /v1 prefix (e.g., /openai/containers/{container_id}).

Retrieve file from container (OpenAI format) Retrieves metadata for a specific file in a container. Note: This endpoint also works without the /v1 prefix (e.g., /openai/containers/{container_id}/files/{file_id}).

Retrieve file metadata (OpenAI format) Retrieves metadata for an uploaded file. Note: This endpoint also works without the /v1 prefix (e.g., /openai/files/{file_id}).

Retrieve a video generation Returns metadata for a previously submitted video generation job.

Upload file (OpenAI format) Uploads a file for use with batch processing or other features. Note: This endpoint also works without the /v1 prefix (e.g., /openai/files).

Functions

azure_create_chat_completion(connection, deployment_id, open_ai_chat_request, opts \\ [])

Create chat completion (Azure OpenAI) Creates a chat completion using Azure OpenAI deployment.

Parameters

  • connection (ExBifrost.Connection): Connection to server
  • deployment_id (String.t): Azure deployment ID
  • open_ai_chat_request (OpenAiChatRequest):
  • opts (keyword): Optional parameters
    • :"api-version" (String.t): Azure API version

Returns

  • {:ok, ExBifrost.Model.ChatCompletionResponse.t} on success
  • {:error, Tesla.Env.t} on failure

azure_create_embedding(connection, deployment_id, open_ai_embedding_request, opts \\ [])

Create embeddings (Azure OpenAI)

Parameters

  • connection (ExBifrost.Connection): Connection to server
  • deployment_id (String.t): Azure deployment ID
  • open_ai_embedding_request (OpenAiEmbeddingRequest):
  • opts (keyword): Optional parameters
    • :"api-version" (String.t):

Returns

  • {:ok, ExBifrost.Model.EmbeddingResponse.t} on success
  • {:error, Tesla.Env.t} on failure

azure_create_image(connection, deployment_id, openai_create_image_request, opts \\ [])

Create image (Azure OpenAI) Generates images from text prompts using Azure OpenAI deployment.

Parameters

  • connection (ExBifrost.Connection): Connection to server
  • deployment_id (String.t): Azure deployment ID
  • openai_create_image_request (OpenaiCreateImageRequest):
  • opts (keyword): Optional parameters
    • :"api-version" (String.t): Azure API version

Returns

  • {:ok, ExBifrost.Model.OpenaiCreateImage200Response.t} on success
  • {:error, Tesla.Env.t} on failure

azure_create_response(connection, deployment_id, open_ai_responses_request, opts \\ [])

Create response (Azure OpenAI)

Parameters

  • connection (ExBifrost.Connection): Connection to server
  • deployment_id (String.t): Azure deployment ID
  • open_ai_responses_request (OpenAiResponsesRequest):
  • opts (keyword): Optional parameters
    • :"api-version" (String.t):

Returns

  • {:ok, ExBifrost.Model.ResponsesResponse.t} on success
  • {:error, Tesla.Env.t} on failure

azure_create_speech(connection, deployment_id, open_ai_speech_request, opts \\ [])

@spec azure_create_speech(
  Tesla.Env.client(),
  String.t(),
  ExBifrost.Model.OpenAiSpeechRequest.t(),
  keyword()
) ::
  {:ok, ExBifrost.Model.BifrostError.t()}
  | {:ok, String.t()}
  | {:error, Tesla.Env.t()}

Create speech (Azure OpenAI TTS)

Parameters

  • connection (ExBifrost.Connection): Connection to server
  • deployment_id (String.t): Azure deployment ID
  • open_ai_speech_request (OpenAiSpeechRequest):
  • opts (keyword): Optional parameters
    • :"api-version" (String.t):

Returns

  • {:ok, String.t} on success
  • {:error, Tesla.Env.t} on failure

azure_create_text_completion(connection, deployment_id, open_ai_text_completion_request, opts \\ [])

Create text completion (Azure OpenAI)

Parameters

  • connection (ExBifrost.Connection): Connection to server
  • deployment_id (String.t): Azure deployment ID
  • open_ai_text_completion_request (OpenAiTextCompletionRequest):
  • opts (keyword): Optional parameters
    • :"api-version" (String.t):

Returns

  • {:ok, ExBifrost.Model.TextCompletionResponse.t} on success
  • {:error, Tesla.Env.t} on failure

azure_create_transcription(connection, deployment_id, model, file, opts \\ [])

@spec azure_create_transcription(
  Tesla.Env.client(),
  String.t(),
  String.t(),
  String.t(),
  keyword()
) ::
  {:ok, ExBifrost.Model.BifrostError.t()}
  | {:ok, ExBifrost.Model.TranscriptionResponse.t()}
  | {:error, Tesla.Env.t()}

Create transcription (Azure OpenAI)

Parameters

  • connection (ExBifrost.Connection): Connection to server
  • deployment_id (String.t): Azure deployment ID
  • model (String.t): Model identifier (e.g., whisper-1)
  • file (String.t): Audio file to transcribe
  • opts (keyword): Optional parameters
    • :"api-version" (String.t):
    • :language (String.t): Language of the audio (ISO 639-1)
    • :prompt (String.t): Prompt to guide transcription
    • :response_format (String.t):
    • :temperature (number()):
    • :timestamp_granularities ([String.t]):
    • :stream (boolean()):
    • :fallbacks ([String.t]):

Returns

  • {:ok, ExBifrost.Model.TranscriptionResponse.t} on success
  • {:error, Tesla.Env.t} on failure

azure_list_models(connection, deployment_id, opts \\ [])

@spec azure_list_models(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, ExBifrost.Model.OpenAiListModelsResponse.t()}
  | {:ok, ExBifrost.Model.BifrostError.t()}
  | {:error, Tesla.Env.t()}

List models (Azure OpenAI)

Parameters

  • connection (ExBifrost.Connection): Connection to server
  • deployment_id (String.t): Azure deployment ID
  • opts (keyword): Optional parameters
    • :"api-version" (String.t):

Returns

  • {:ok, ExBifrost.Model.OpenAiListModelsResponse.t} on success
  • {:error, Tesla.Env.t} on failure

openai_cancel_batch(connection, batch_id, opts \\ [])

@spec openai_cancel_batch(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, ExBifrost.Model.BifrostError.t()}
  | {:ok, ExBifrost.Model.CancelBatch200Response.t()}
  | {:error, Tesla.Env.t()}

Cancel batch job (OpenAI format) Cancels a batch processing job. Note: This endpoint also works without the /v1 prefix (e.g., /openai/batches/{batch_id}/cancel).

Parameters

  • connection (ExBifrost.Connection): Connection to server
  • batch_id (String.t): Batch job ID to cancel
  • opts (keyword): Optional parameters
    • :provider (String.t): Provider for the batch

Returns

  • {:ok, ExBifrost.Model.CancelBatch200Response.t} on success
  • {:error, Tesla.Env.t} on failure

openai_count_input_tokens(connection, open_ai_responses_request, opts \\ [])

Count input tokens Counts the number of tokens in a Responses API request.

Parameters

  • connection (ExBifrost.Connection): Connection to server
  • open_ai_responses_request (OpenAiResponsesRequest):
  • opts (keyword): Optional parameters

Returns

  • {:ok, ExBifrost.Model.CountTokensResponse.t} on success
  • {:error, Tesla.Env.t} on failure

openai_create_batch(connection, batch_create_request, opts \\ [])

Create batch job (OpenAI format) Creates a batch processing job. Note: This endpoint also works without the /v1 prefix (e.g., /openai/batches).

Parameters

  • connection (ExBifrost.Connection): Connection to server
  • batch_create_request (BatchCreateRequest):
  • opts (keyword): Optional parameters

Returns

  • {:ok, ExBifrost.Model.BatchCreateResponse.t} on success
  • {:error, Tesla.Env.t} on failure

openai_create_chat_completion(connection, open_ai_chat_request, opts \\ [])

Create chat completion (OpenAI format) Creates a chat completion using OpenAI-compatible format. Supports streaming via SSE. Async inference: Send x-bf-async: true to submit the request as a background job and receive a job ID immediately. Poll with x-bf-async-id: <job-id> to retrieve the result. When the job is still processing, the response will have an empty choices array. When completed, choices will contain the full result. See Async Inference for details. Note: This endpoint also works without the /v1 prefix (e.g., /openai/chat/completions).

Parameters

  • connection (ExBifrost.Connection): Connection to server
  • open_ai_chat_request (OpenAiChatRequest):
  • opts (keyword): Optional parameters
    • :"x-bf-async" (String.t): Set to true to submit this request as an async job. Returns immediately with a job ID. Not compatible with streaming.
    • :"x-bf-async-id" (String.t): Poll for results of a previously submitted async job by providing the job ID returned from the initial async request.
    • :"x-bf-async-job-result-ttl" (integer()): Override the default result TTL in seconds. Results expire after this duration from completion time.

Returns

  • {:ok, ExBifrost.Model.ChatCompletionResponse.t} on success
  • {:error, Tesla.Env.t} on failure

openai_create_compaction(connection, create_compaction_request, opts \\ [])

Compact context (OpenAI) Compresses a conversation into an opaque compaction item using the OpenAI-compatible /v1/responses/compact endpoint. Drop-in compatible with the OpenAI SDK. The response output contains the user messages plus a final item with type: "response.compaction" and encrypted_content. Pass this output as input to future Responses API calls to continue the conversation using the compacted context. Note: This endpoint also works without the /v1 prefix (e.g., /openai/responses/compact).

Parameters

  • connection (ExBifrost.Connection): Connection to server
  • create_compaction_request (CreateCompactionRequest):
  • opts (keyword): Optional parameters

Returns

  • {:ok, ExBifrost.Model.CreateCompaction200Response.t} on success
  • {:error, Tesla.Env.t} on failure

openai_create_container(connection, create_container_request, opts \\ [])

Create container (OpenAI format) Creates a new container for storing files and data. Note: This endpoint also works without the /v1 prefix (e.g., /openai/containers).

Parameters

  • connection (ExBifrost.Connection): Connection to server
  • create_container_request (CreateContainerRequest):
  • opts (keyword): Optional parameters

Returns

  • {:ok, ExBifrost.Model.CreateContainer200Response.t} on success
  • {:error, Tesla.Env.t} on failure

openai_create_container_file(connection, container_id, opts \\ [])

@spec openai_create_container_file(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, ExBifrost.Model.CreateContainerFile200Response.t()}
  | {:ok, ExBifrost.Model.BifrostError.t()}
  | {:error, Tesla.Env.t()}

Create file in container (OpenAI format) Creates a new file in a container. You can either upload file content directly via multipart/form-data or reference an existing file by its ID. Note: This endpoint also works without the /v1 prefix (e.g., /openai/containers/{container_id}/files).

Parameters

  • connection (ExBifrost.Connection): Connection to server
  • container_id (String.t): Container ID
  • opts (keyword): Optional parameters
    • :provider (String.t): Provider for the container (defaults to openai)
    • :file (String.t): The file content to upload
    • :file_path (String.t): Optional path for the file within the container

Returns

  • {:ok, ExBifrost.Model.CreateContainerFile200Response.t} on success
  • {:error, Tesla.Env.t} on failure

openai_create_embedding(connection, open_ai_embedding_request, opts \\ [])

Create embeddings (OpenAI format) Creates embedding vectors for the input text. Note: This endpoint also works without the /v1 prefix (e.g., /openai/embeddings).

Parameters

  • connection (ExBifrost.Connection): Connection to server
  • open_ai_embedding_request (OpenAiEmbeddingRequest):
  • opts (keyword): Optional parameters

Returns

  • {:ok, ExBifrost.Model.EmbeddingResponse.t} on success
  • {:error, Tesla.Env.t} on failure

openai_create_image(connection, openai_create_image_request, opts \\ [])

Create image Generates images from text prompts using OpenAI-compatible format. Note: Azure OpenAI deployments are also supported via the Azure integration endpoint. Note: This endpoint also works without the /v1 prefix (e.g., /openai/images/generations).

Parameters

  • connection (ExBifrost.Connection): Connection to server
  • openai_create_image_request (OpenaiCreateImageRequest):
  • opts (keyword): Optional parameters

Returns

  • {:ok, ExBifrost.Model.OpenaiCreateImage200Response.t} on success
  • {:error, Tesla.Env.t} on failure

openai_create_response(connection, open_ai_responses_request, opts \\ [])

Create response (OpenAI Responses API) Creates a response using OpenAI Responses API format. Supports streaming via SSE. Async inference: Send x-bf-async: true to submit the request as a background job and receive a job ID immediately. Poll with x-bf-async-id: <job-id> to retrieve the result. When the job is still processing, the response status will not be completed. When completed, the full response with output_text will be returned. See Async Inference for details. Note: This endpoint also works without the /v1 prefix (e.g., /openai/responses).

Parameters

  • connection (ExBifrost.Connection): Connection to server
  • open_ai_responses_request (OpenAiResponsesRequest):
  • opts (keyword): Optional parameters
    • :"x-bf-async" (String.t): Set to true to submit this request as an async job. Returns immediately with a job ID. Not compatible with streaming.
    • :"x-bf-async-id" (String.t): Poll for results of a previously submitted async job by providing the job ID returned from the initial async request.
    • :"x-bf-async-job-result-ttl" (integer()): Override the default result TTL in seconds. Results expire after this duration from completion time.

Returns

  • {:ok, ExBifrost.Model.ResponsesResponse.t} on success
  • {:error, Tesla.Env.t} on failure

openai_create_speech(connection, open_ai_speech_request, opts \\ [])

@spec openai_create_speech(
  Tesla.Env.client(),
  ExBifrost.Model.OpenAiSpeechRequest.t(),
  keyword()
) ::
  {:ok, ExBifrost.Model.BifrostError.t()}
  | {:ok, String.t()}
  | {:error, Tesla.Env.t()}

Create speech (OpenAI TTS) Generates audio from text using OpenAI TTS. Supports streaming via SSE when stream_format is set to 'sse'. Note: This endpoint also works without the /v1 prefix (e.g., /openai/audio/speech).

Parameters

  • connection (ExBifrost.Connection): Connection to server
  • open_ai_speech_request (OpenAiSpeechRequest):
  • opts (keyword): Optional parameters

Returns

  • {:ok, String.t} on success
  • {:error, Tesla.Env.t} on failure

openai_create_text_completion(connection, open_ai_text_completion_request, opts \\ [])

Create text completion (OpenAI format) Creates a text completion using OpenAI-compatible format. This is the legacy completions API. Note: This endpoint also works without the /v1 prefix (e.g., /openai/completions).

Parameters

  • connection (ExBifrost.Connection): Connection to server
  • open_ai_text_completion_request (OpenAiTextCompletionRequest):
  • opts (keyword): Optional parameters

Returns

  • {:ok, ExBifrost.Model.TextCompletionResponse.t} on success
  • {:error, Tesla.Env.t} on failure

openai_create_transcription(connection, model, file, opts \\ [])

@spec openai_create_transcription(
  Tesla.Env.client(),
  String.t(),
  String.t(),
  keyword()
) ::
  {:ok, ExBifrost.Model.BifrostError.t()}
  | {:ok, ExBifrost.Model.TranscriptionResponse.t()}
  | {:error, Tesla.Env.t()}

Create transcription (OpenAI Whisper) Transcribes audio into text using OpenAI Whisper. Note: This endpoint also works without the /v1 prefix (e.g., /openai/audio/transcriptions).

Parameters

  • connection (ExBifrost.Connection): Connection to server
  • model (String.t): Model identifier (e.g., whisper-1)
  • file (String.t): Audio file to transcribe
  • opts (keyword): Optional parameters
    • :language (String.t): Language of the audio (ISO 639-1)
    • :prompt (String.t): Prompt to guide transcription
    • :response_format (String.t):
    • :temperature (number()):
    • :timestamp_granularities ([String.t]):
    • :stream (boolean()):
    • :fallbacks ([String.t]):

Returns

  • {:ok, ExBifrost.Model.TranscriptionResponse.t} on success
  • {:error, Tesla.Env.t} on failure

openai_create_video(connection, model, prompt, opts \\ [])

@spec openai_create_video(Tesla.Env.client(), String.t(), String.t(), keyword()) ::
  {:ok, %{optional(String.t()) => any()}}
  | {:ok, ExBifrost.Model.BifrostError.t()}
  | {:error, Tesla.Env.t()}

Create a video generation Submits a video generation job using OpenAI's Videos API. The request is multipart/form-data and may include reference images.

Parameters

  • connection (ExBifrost.Connection): Connection to server
  • model (String.t): Video model identifier (e.g. sora-1.0).
  • prompt (String.t): Natural-language description of the requested video.
  • opts (keyword): Optional parameters
    • :size (String.t): Output resolution (e.g. 1024x1024).
    • :seconds (integer()): Target duration in seconds.
    • :input_reference (String.t): Optional reference image used to seed generation.

Returns

  • {:ok, %{}} on success
  • {:error, Tesla.Env.t} on failure

openai_delete_container(connection, container_id, opts \\ [])

@spec openai_delete_container(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, ExBifrost.Model.DeleteFile200Response.t()}
  | {:ok, ExBifrost.Model.BifrostError.t()}
  | {:error, Tesla.Env.t()}

Delete container (OpenAI format) Deletes a container. Note: This endpoint also works without the /v1 prefix (e.g., /openai/containers/{container_id}).

Parameters

  • connection (ExBifrost.Connection): Connection to server
  • container_id (String.t): Container ID to delete
  • opts (keyword): Optional parameters
    • :provider (String.t): Provider for the container (defaults to openai)

Returns

  • {:ok, ExBifrost.Model.DeleteFile200Response.t} on success
  • {:error, Tesla.Env.t} on failure

openai_delete_container_file(connection, container_id, file_id, opts \\ [])

@spec openai_delete_container_file(
  Tesla.Env.client(),
  String.t(),
  String.t(),
  keyword()
) ::
  {:ok, ExBifrost.Model.DeleteFile200Response.t()}
  | {:ok, ExBifrost.Model.BifrostError.t()}
  | {:error, Tesla.Env.t()}

Delete file from container (OpenAI format) Deletes a file from a container. Note: This endpoint also works without the /v1 prefix (e.g., /openai/containers/{container_id}/files/{file_id}).

Parameters

  • connection (ExBifrost.Connection): Connection to server
  • container_id (String.t): Container ID
  • file_id (String.t): File ID to delete
  • opts (keyword): Optional parameters
    • :provider (String.t): Provider for the container (defaults to openai)

Returns

  • {:ok, ExBifrost.Model.DeleteFile200Response.t} on success
  • {:error, Tesla.Env.t} on failure

openai_delete_file(connection, file_id, opts \\ [])

@spec openai_delete_file(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, ExBifrost.Model.DeleteFile200Response.t()}
  | {:ok, ExBifrost.Model.BifrostError.t()}
  | {:error, Tesla.Env.t()}

Delete file (OpenAI format) Deletes an uploaded file. Note: This endpoint also works without the /v1 prefix (e.g., /openai/files/{file_id}).

Parameters

  • connection (ExBifrost.Connection): Connection to server
  • file_id (String.t): File ID to delete
  • opts (keyword): Optional parameters
    • :provider (String.t): Provider for the file

Returns

  • {:ok, ExBifrost.Model.DeleteFile200Response.t} on success
  • {:error, Tesla.Env.t} on failure

openai_delete_video(connection, video_id, opts \\ [])

@spec openai_delete_video(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, nil}
  | {:ok, %{optional(String.t()) => any()}}
  | {:ok, ExBifrost.Model.BifrostError.t()}
  | {:error, Tesla.Env.t()}

Delete a video generation Deletes a previously generated video.

Parameters

  • connection (ExBifrost.Connection): Connection to server
  • video_id (String.t):
  • opts (keyword): Optional parameters

Returns

  • {:ok, %{}} on success
  • {:error, Tesla.Env.t} on failure

openai_download_video(connection, video_id, opts \\ [])

@spec openai_download_video(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, nil}
  | {:ok, ExBifrost.Model.BifrostError.t()}
  | {:ok, String.t()}
  | {:error, Tesla.Env.t()}

Download generated video content Streams the binary video bytes for a completed generation job.

Parameters

  • connection (ExBifrost.Connection): Connection to server
  • video_id (String.t):
  • opts (keyword): Optional parameters

Returns

  • {:ok, String.t} on success
  • {:error, Tesla.Env.t} on failure

openai_get_container_file_content(connection, container_id, file_id, opts \\ [])

@spec openai_get_container_file_content(
  Tesla.Env.client(),
  String.t(),
  String.t(),
  keyword()
) ::
  {:ok, ExBifrost.Model.BifrostError.t()}
  | {:ok, String.t()}
  | {:error, Tesla.Env.t()}

Get file content from container (OpenAI format) Downloads the content of a file from a container. Note: This endpoint also works without the /v1 prefix (e.g., /openai/containers/{container_id}/files/{file_id}/content).

Parameters

  • connection (ExBifrost.Connection): Connection to server
  • container_id (String.t): Container ID
  • file_id (String.t): File ID
  • opts (keyword): Optional parameters
    • :provider (String.t): Provider for the container (defaults to openai)

Returns

  • {:ok, String.t} on success
  • {:error, Tesla.Env.t} on failure

openai_get_file_content(connection, file_id, opts \\ [])

@spec openai_get_file_content(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, ExBifrost.Model.BifrostError.t()}
  | {:ok, String.t()}
  | {:error, Tesla.Env.t()}

Get file content (OpenAI format) Retrieves the content of an uploaded file. Note: This endpoint also works without the /v1 prefix (e.g., /openai/files/{file_id}/content).

Parameters

  • connection (ExBifrost.Connection): Connection to server
  • file_id (String.t): File ID
  • opts (keyword): Optional parameters
    • :provider (String.t): Provider for the file

Returns

  • {:ok, String.t} on success
  • {:error, Tesla.Env.t} on failure

openai_list_batches(connection, opts \\ [])

@spec openai_list_batches(
  Tesla.Env.client(),
  keyword()
) ::
  {:ok, ExBifrost.Model.BatchListResponse.t()}
  | {:ok, ExBifrost.Model.BifrostError.t()}
  | {:error, Tesla.Env.t()}

List batch jobs (OpenAI format) Lists batch processing jobs. Note: This endpoint also works without the /v1 prefix (e.g., /openai/batches).

Parameters

  • connection (ExBifrost.Connection): Connection to server
  • opts (keyword): Optional parameters
    • :limit (integer()): Maximum number of batches to return
    • :after (String.t): Cursor for pagination
    • :provider (String.t): Filter by provider

Returns

  • {:ok, ExBifrost.Model.BatchListResponse.t} on success
  • {:error, Tesla.Env.t} on failure

openai_list_container_files(connection, container_id, opts \\ [])

@spec openai_list_container_files(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, ExBifrost.Model.ListContainerFiles200Response.t()}
  | {:ok, ExBifrost.Model.BifrostError.t()}
  | {:error, Tesla.Env.t()}

List files in container (OpenAI format) Lists all files in a container. Note: This endpoint also works without the /v1 prefix (e.g., /openai/containers/{container_id}/files).

Parameters

  • connection (ExBifrost.Connection): Connection to server
  • container_id (String.t): Container ID
  • opts (keyword): Optional parameters
    • :provider (String.t): Provider for the container (defaults to openai)
    • :limit (integer()): Maximum files to return
    • :after (String.t): Cursor for pagination
    • :order (String.t): Sort order

Returns

  • {:ok, ExBifrost.Model.ListContainerFiles200Response.t} on success
  • {:error, Tesla.Env.t} on failure

openai_list_containers(connection, opts \\ [])

@spec openai_list_containers(
  Tesla.Env.client(),
  keyword()
) ::
  {:ok, ExBifrost.Model.BifrostError.t()}
  | {:ok, ExBifrost.Model.ListContainers200Response.t()}
  | {:error, Tesla.Env.t()}

List containers (OpenAI format) Lists containers for a provider. Note: This endpoint also works without the /v1 prefix (e.g., /openai/containers).

Parameters

  • connection (ExBifrost.Connection): Connection to server
  • opts (keyword): Optional parameters
    • :provider (String.t): Provider to list containers for (defaults to openai)
    • :limit (integer()): Maximum containers to return
    • :after (String.t): Cursor for pagination
    • :order (String.t): Sort order

Returns

  • {:ok, ExBifrost.Model.ListContainers200Response.t} on success
  • {:error, Tesla.Env.t} on failure

openai_list_files(connection, opts \\ [])

@spec openai_list_files(
  Tesla.Env.client(),
  keyword()
) ::
  {:ok, ExBifrost.Model.BifrostError.t()}
  | {:ok, ExBifrost.Model.FileListResponse.t()}
  | {:error, Tesla.Env.t()}

List files (OpenAI format) Lists uploaded files. Note: This endpoint also works without the /v1 prefix (e.g., /openai/files).

Parameters

  • connection (ExBifrost.Connection): Connection to server
  • opts (keyword): Optional parameters
    • :purpose (String.t): Filter by purpose
    • :limit (integer()): Maximum files to return
    • :after (String.t): Cursor for pagination
    • :order (String.t):
    • :provider (String.t): Filter by provider

Returns

  • {:ok, ExBifrost.Model.FileListResponse.t} on success
  • {:error, Tesla.Env.t} on failure

openai_list_models(connection, opts \\ [])

@spec openai_list_models(
  Tesla.Env.client(),
  keyword()
) ::
  {:ok, ExBifrost.Model.OpenAiListModelsResponse.t()}
  | {:ok, ExBifrost.Model.BifrostError.t()}
  | {:error, Tesla.Env.t()}

List models (OpenAI format) Lists available models in OpenAI format. Note: This endpoint also works without the /v1 prefix (e.g., /openai/models).

Parameters

  • connection (ExBifrost.Connection): Connection to server
  • opts (keyword): Optional parameters

Returns

  • {:ok, ExBifrost.Model.OpenAiListModelsResponse.t} on success
  • {:error, Tesla.Env.t} on failure

openai_list_videos(connection, opts \\ [])

@spec openai_list_videos(
  Tesla.Env.client(),
  keyword()
) ::
  {:ok, %{optional(String.t()) => any()}}
  | {:ok, ExBifrost.Model.BifrostError.t()}
  | {:error, Tesla.Env.t()}

List video generations Lists previously submitted video generation jobs.

Parameters

  • connection (ExBifrost.Connection): Connection to server
  • opts (keyword): Optional parameters
    • :limit (integer()):
    • :after (String.t):
    • :order (String.t):

Returns

  • {:ok, %{}} on success
  • {:error, Tesla.Env.t} on failure

openai_realtime_call(connection, opts \\ [])

@spec openai_realtime_call(
  Tesla.Env.client(),
  keyword()
) ::
  {:ok, ExBifrost.Model.BifrostError.t()}
  | {:ok, String.t()}
  | {:error, Tesla.Env.t()}

WebRTC Realtime SDP exchange (OpenAI alias) OpenAI-prefixed alias of POST /v1/realtime/calls. Performs the WebRTC SDP exchange for OpenAI Realtime calls. Accepts either multipart form data with sdp + session parts (GA) or a raw SDP body (legacy).

Parameters

  • connection (ExBifrost.Connection): Connection to server
  • opts (keyword): Optional parameters
    • :sdp (String.t): WebRTC offer SDP.
    • :session (String.t): JSON-encoded session configuration.

Returns

  • {:ok, String.t} on success
  • {:error, Tesla.Env.t} on failure

openai_realtime_client_secret(connection, request_body, opts \\ [])

@spec openai_realtime_client_secret(
  Tesla.Env.client(),
  %{optional(String.t()) => any()},
  keyword()
) ::
  {:ok, %{optional(String.t()) => any()}}
  | {:ok, ExBifrost.Model.BifrostError.t()}
  | {:error, Tesla.Env.t()}

Create realtime client secret (OpenAI alias) OpenAI-prefixed alias of POST /v1/realtime/client_secrets. Mints an ephemeral client secret used to authorize a downstream Realtime client.

Parameters

  • connection (ExBifrost.Connection): Connection to server
  • request_body (%{optional(String.t) => any()}):
  • opts (keyword): Optional parameters

Returns

  • {:ok, %{}} on success
  • {:error, Tesla.Env.t} on failure

openai_realtime_session(connection, request_body, opts \\ [])

@spec openai_realtime_session(
  Tesla.Env.client(),
  %{optional(String.t()) => any()},
  keyword()
) ::
  {:ok, %{optional(String.t()) => any()}}
  | {:ok, ExBifrost.Model.BifrostError.t()}
  | {:error, Tesla.Env.t()}

Create realtime session (OpenAI alias) OpenAI-prefixed alias of POST /v1/realtime/sessions. Creates a pre-configured realtime session that can be joined by clients.

Parameters

  • connection (ExBifrost.Connection): Connection to server
  • request_body (%{optional(String.t) => any()}):
  • opts (keyword): Optional parameters

Returns

  • {:ok, %{}} on success
  • {:error, Tesla.Env.t} on failure

openai_realtime_web_socket(connection, upgrade, opts \\ [])

@spec openai_realtime_web_socket(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, nil} | {:ok, ExBifrost.Model.BifrostError.t()} | {:error, Tesla.Env.t()}

WebSocket Realtime (OpenAI alias) OpenAI-prefixed alias of GET /v1/realtime. WebSocket upgrade endpoint for OpenAI Realtime; selects the model via the model query parameter (Azure GA) or deployment (preview).

Parameters

  • connection (ExBifrost.Connection): Connection to server
  • upgrade (String.t):
  • opts (keyword): Optional parameters
    • :model (String.t):
    • :deployment (String.t):
    • :"Sec-WebSocket-Protocol" (String.t):

Returns

  • {:ok, nil} on success
  • {:error, Tesla.Env.t} on failure

openai_remix_video(connection, video_id, request_body, opts \\ [])

@spec openai_remix_video(
  Tesla.Env.client(),
  String.t(),
  %{optional(String.t()) => any()},
  keyword()
) ::
  {:ok, %{optional(String.t()) => any()}}
  | {:ok, ExBifrost.Model.BifrostError.t()}
  | {:error, Tesla.Env.t()}

Remix an existing video Creates a new generation by remixing a prior video with new prompt parameters.

Parameters

  • connection (ExBifrost.Connection): Connection to server
  • video_id (String.t):
  • request_body (%{optional(String.t) => any()}):
  • opts (keyword): Optional parameters

Returns

  • {:ok, %{}} on success
  • {:error, Tesla.Env.t} on failure

openai_responses_web_socket(connection, upgrade, opts \\ [])

@spec openai_responses_web_socket(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, nil} | {:error, Tesla.Env.t()}

WebSocket Responses (OpenAI alias) WebSocket upgrade endpoint for the Responses API. Mirrors the canonical GET /v1/responses WS endpoint; the OpenAI-prefixed path is selected when the request includes an Upgrade: websocket header. Authentication accepts the same headers as the inference HTTP surface plus the openai-insecure-api-key.<key> subprotocol fallback.

Parameters

  • connection (ExBifrost.Connection): Connection to server
  • upgrade (String.t):
  • opts (keyword): Optional parameters
    • :"Sec-WebSocket-Protocol" (String.t): Optional subprotocol; supports openai-insecure-api-key.<key> for SDK-style auth.

Returns

  • {:ok, nil} on success
  • {:error, Tesla.Env.t} on failure

openai_retrieve_batch(connection, batch_id, opts \\ [])

@spec openai_retrieve_batch(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, ExBifrost.Model.BatchRetrieveResponse.t()}
  | {:ok, ExBifrost.Model.BifrostError.t()}
  | {:error, Tesla.Env.t()}

Retrieve batch job (OpenAI format) Retrieves details of a batch processing job. Note: This endpoint also works without the /v1 prefix (e.g., /openai/batches/{batch_id}).

Parameters

  • connection (ExBifrost.Connection): Connection to server
  • batch_id (String.t): Batch job ID
  • opts (keyword): Optional parameters
    • :provider (String.t): Provider for the batch

Returns

  • {:ok, ExBifrost.Model.BatchRetrieveResponse.t} on success
  • {:error, Tesla.Env.t} on failure

openai_retrieve_container(connection, container_id, opts \\ [])

@spec openai_retrieve_container(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, ExBifrost.Model.CreateContainer200Response.t()}
  | {:ok, ExBifrost.Model.BifrostError.t()}
  | {:error, Tesla.Env.t()}

Retrieve container (OpenAI format) Retrieves a specific container by ID. Note: This endpoint also works without the /v1 prefix (e.g., /openai/containers/{container_id}).

Parameters

  • connection (ExBifrost.Connection): Connection to server
  • container_id (String.t): Container ID
  • opts (keyword): Optional parameters
    • :provider (String.t): Provider for the container (defaults to openai)

Returns

  • {:ok, ExBifrost.Model.CreateContainer200Response.t} on success
  • {:error, Tesla.Env.t} on failure

openai_retrieve_container_file(connection, container_id, file_id, opts \\ [])

@spec openai_retrieve_container_file(
  Tesla.Env.client(),
  String.t(),
  String.t(),
  keyword()
) ::
  {:ok, ExBifrost.Model.CreateContainerFile200Response.t()}
  | {:ok, ExBifrost.Model.BifrostError.t()}
  | {:error, Tesla.Env.t()}

Retrieve file from container (OpenAI format) Retrieves metadata for a specific file in a container. Note: This endpoint also works without the /v1 prefix (e.g., /openai/containers/{container_id}/files/{file_id}).

Parameters

  • connection (ExBifrost.Connection): Connection to server
  • container_id (String.t): Container ID
  • file_id (String.t): File ID
  • opts (keyword): Optional parameters
    • :provider (String.t): Provider for the container (defaults to openai)

Returns

  • {:ok, ExBifrost.Model.CreateContainerFile200Response.t} on success
  • {:error, Tesla.Env.t} on failure

openai_retrieve_file(connection, file_id, opts \\ [])

@spec openai_retrieve_file(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, ExBifrost.Model.BifrostError.t()}
  | {:ok, ExBifrost.Model.RetrieveFile200Response.t()}
  | {:error, Tesla.Env.t()}

Retrieve file metadata (OpenAI format) Retrieves metadata for an uploaded file. Note: This endpoint also works without the /v1 prefix (e.g., /openai/files/{file_id}).

Parameters

  • connection (ExBifrost.Connection): Connection to server
  • file_id (String.t): File ID
  • opts (keyword): Optional parameters
    • :provider (String.t): Provider for the file

Returns

  • {:ok, ExBifrost.Model.RetrieveFile200Response.t} on success
  • {:error, Tesla.Env.t} on failure

openai_retrieve_video(connection, video_id, opts \\ [])

@spec openai_retrieve_video(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, nil}
  | {:ok, %{optional(String.t()) => any()}}
  | {:ok, ExBifrost.Model.BifrostError.t()}
  | {:error, Tesla.Env.t()}

Retrieve a video generation Returns metadata for a previously submitted video generation job.

Parameters

  • connection (ExBifrost.Connection): Connection to server
  • video_id (String.t):
  • opts (keyword): Optional parameters

Returns

  • {:ok, %{}} on success
  • {:error, Tesla.Env.t} on failure

openai_upload_file(connection, file, purpose, opts \\ [])

@spec openai_upload_file(Tesla.Env.client(), String.t(), String.t(), keyword()) ::
  {:ok, ExBifrost.Model.FileUploadResponse.t()}
  | {:ok, ExBifrost.Model.BifrostError.t()}
  | {:error, Tesla.Env.t()}

Upload file (OpenAI format) Uploads a file for use with batch processing or other features. Note: This endpoint also works without the /v1 prefix (e.g., /openai/files).

Parameters

  • connection (ExBifrost.Connection): Connection to server
  • file (String.t): File to upload
  • purpose (String.t): Purpose of the file
  • opts (keyword): Optional parameters
    • :provider (String.t): Provider for file storage
    • :storage_config (ExBifrost.Model.OpenaiUploadFileRequestStorageConfig.t):

Returns

  • {:ok, ExBifrost.Model.FileUploadResponse.t} on success
  • {:error, Tesla.Env.t} on failure