ExBifrost.Api.AsyncJobs (ex_bifrost v0.1.0)

Copy Markdown View Source

API calls for all endpoints tagged AsyncJobs.

Summary

Functions

Create async chat completion Submits a chat completion request for asynchronous execution. Returns a job ID immediately with HTTP 202. Poll the corresponding GET endpoint with the job ID to retrieve the result. Streaming is not supported for async requests.

Create async embedding Submits an embedding request for asynchronous execution. Returns a job ID immediately with HTTP 202. Poll the corresponding GET endpoint with the job ID to retrieve the result.

Create async image edit Submits an image edit request for asynchronous execution. Returns a job ID immediately with HTTP 202. Poll the corresponding GET endpoint with the job ID to retrieve the result. Streaming is not supported for async requests.

Create async image generation Submits an image generation request for asynchronous execution. Returns a job ID immediately with HTTP 202. Poll the corresponding GET endpoint with the job ID to retrieve the result. Streaming is not supported for async requests.

Create async image variation Submits an image variation request for asynchronous execution. Returns a job ID immediately with HTTP 202. Poll the corresponding GET endpoint with the job ID to retrieve the result.

Create async OCR job Submits an OCR request for asynchronous execution. Returns a job ID immediately with HTTP 202. Poll the corresponding GET endpoint with the job ID to retrieve the result.

Create async rerank Submits a rerank request for asynchronous execution. Returns a job ID immediately with HTTP 202. Poll the corresponding GET endpoint with the job ID to retrieve the result.

Create async response Submits a response request for asynchronous execution. Returns a job ID immediately with HTTP 202. Poll the corresponding GET endpoint with the job ID to retrieve the result. Streaming is not supported for async requests.

Create async speech Submits a speech synthesis request for asynchronous execution. Returns a job ID immediately with HTTP 202. Poll the corresponding GET endpoint with the job ID to retrieve the result. SSE streaming is not supported for async requests.

Create async text completion Submits a text completion request for asynchronous execution. Returns a job ID immediately with HTTP 202. Poll the corresponding GET endpoint with the job ID to retrieve the result. Streaming is not supported for async requests.

Create async transcription Submits a transcription request for asynchronous execution. Returns a job ID immediately with HTTP 202. Poll the corresponding GET endpoint with the job ID to retrieve the result. Streaming is not supported for async requests.

Get async chat completion job Retrieves the status and result of an async chat completion job. Returns HTTP 202 if the job is still pending or processing, HTTP 200 if completed or failed.

Get async embedding job Retrieves the status and result of an async embedding job. Returns HTTP 202 if the job is still pending or processing, HTTP 200 if completed or failed.

Get async image edit job Retrieves the status and result of an async image edit job. Returns HTTP 202 if the job is still pending or processing, HTTP 200 if completed or failed.

Get async image generation job Retrieves the status and result of an async image generation job. Returns HTTP 202 if the job is still pending or processing, HTTP 200 if completed or failed.

Get async image variation job Retrieves the status and result of an async image variation job. Returns HTTP 202 if the job is still pending or processing, HTTP 200 if completed or failed.

Get async OCR job Retrieves the status and result of an async OCR job. Returns HTTP 202 if the job is still pending or processing, HTTP 200 if completed or failed.

Get async rerank job Retrieves the status and result of an async rerank job. Returns HTTP 202 if the job is still pending or processing, HTTP 200 if completed or failed.

Get async response job Retrieves the status and result of an async response job. Returns HTTP 202 if the job is still pending or processing, HTTP 200 if completed or failed.

Get async speech job Retrieves the status and result of an async speech job. Returns HTTP 202 if the job is still pending or processing, HTTP 200 if completed or failed.

Get async text completion job Retrieves the status and result of an async text completion job. Returns HTTP 202 if the job is still pending or processing, HTTP 200 if completed or failed.

Get async transcription job Retrieves the status and result of an async transcription job. Returns HTTP 202 if the job is still pending or processing, HTTP 200 if completed or failed.

Functions

create_async_chat_completion(connection, chat_completion_request, opts \\ [])

Create async chat completion Submits a chat completion request for asynchronous execution. Returns a job ID immediately with HTTP 202. Poll the corresponding GET endpoint with the job ID to retrieve the result. Streaming is not supported for async requests.

Parameters

  • connection (ExBifrost.Connection): Connection to server
  • chat_completion_request (ChatCompletionRequest):
  • opts (keyword): Optional parameters
    • :"x-bf-async-job-result-ttl" (integer()): Time-to-live in seconds for the job result after completion. Defaults to 3600 (1 hour). After expiry, the job result is automatically cleaned up.
    • :"x-bf-async-webhook" (String.t): Name of a registered webhook endpoint to notify when this job reaches a terminal state (completed or failed). The endpoint must already exist and be enabled, and must be subscribed to the resulting event; otherwise the submission is rejected with HTTP 400. When omitted, no webhook is sent for the job and results are retrieved by polling. See the Webhooks management API to register endpoints.

Returns

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

create_async_embedding(connection, embedding_request, opts \\ [])

Create async embedding Submits an embedding request for asynchronous execution. Returns a job ID immediately with HTTP 202. Poll the corresponding GET endpoint with the job ID to retrieve the result.

Parameters

  • connection (ExBifrost.Connection): Connection to server
  • embedding_request (EmbeddingRequest):
  • opts (keyword): Optional parameters
    • :"x-bf-async-job-result-ttl" (integer()): Time-to-live in seconds for the job result after completion. Defaults to 3600 (1 hour). After expiry, the job result is automatically cleaned up.
    • :"x-bf-async-webhook" (String.t): Name of a registered webhook endpoint to notify when this job reaches a terminal state (completed or failed). The endpoint must already exist and be enabled, and must be subscribed to the resulting event; otherwise the submission is rejected with HTTP 400. When omitted, no webhook is sent for the job and results are retrieved by polling. See the Webhooks management API to register endpoints.

Returns

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

create_async_image_edit(connection, model, image, opts \\ [])

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

Create async image edit Submits an image edit request for asynchronous execution. Returns a job ID immediately with HTTP 202. Poll the corresponding GET endpoint with the job ID to retrieve the result. Streaming is not supported for async requests.

Parameters

  • connection (ExBifrost.Connection): Connection to server
  • model (String.t): Model identifier in format provider/model
  • image (String.t): Image file to edit. Use field name image for a single file or image[] for multiple files.
  • opts (keyword): Optional parameters
    • :"x-bf-async-job-result-ttl" (integer()): Time-to-live in seconds for the job result after completion. Defaults to 3600 (1 hour). After expiry, the job result is automatically cleaned up.
    • :"x-bf-async-webhook" (String.t): Name of a registered webhook endpoint to notify when this job reaches a terminal state (completed or failed). The endpoint must already exist and be enabled, and must be subscribed to the resulting event; otherwise the submission is rejected with HTTP 400. When omitted, no webhook is sent for the job and results are retrieved by polling. See the Webhooks management API to register endpoints.
    • :prompt (String.t): Text prompt describing the edit. Required unless type is background_removal.
    • :mask (String.t): Optional mask image for inpainting (transparent areas indicate regions to edit)
    • :type (String.t): Type of edit operation
    • :n (integer()): Number of images to generate
    • :size (String.t): Size of the output image
    • :response_format (String.t): Format of the response
    • :stream (boolean()): When true, stream the response via Server-Sent Events
    • :background (String.t): Background type for the image
    • :input_fidelity (String.t): How closely to follow the original image
    • :partial_images (integer()): Number of partial images to generate when streaming
    • :quality (String.t): Quality of the output image
    • :output_format (String.t): Output image format
    • :num_inference_steps (integer()): Number of inference steps
    • :seed (integer()): Seed for reproducible editing
    • :output_compression (integer()): Compression level (0-100%)
    • :negative_prompt (String.t): What to avoid in the edit
    • :user (String.t): User identifier for tracking
    • :fallbacks ([ExBifrost.Model.Fallback.t]): Fallback models to try if primary model fails

Returns

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

create_async_image_generation(connection, image_generation_request, opts \\ [])

Create async image generation Submits an image generation request for asynchronous execution. Returns a job ID immediately with HTTP 202. Poll the corresponding GET endpoint with the job ID to retrieve the result. Streaming is not supported for async requests.

Parameters

  • connection (ExBifrost.Connection): Connection to server
  • image_generation_request (ImageGenerationRequest):
  • opts (keyword): Optional parameters
    • :"x-bf-async-job-result-ttl" (integer()): Time-to-live in seconds for the job result after completion. Defaults to 3600 (1 hour). After expiry, the job result is automatically cleaned up.
    • :"x-bf-async-webhook" (String.t): Name of a registered webhook endpoint to notify when this job reaches a terminal state (completed or failed). The endpoint must already exist and be enabled, and must be subscribed to the resulting event; otherwise the submission is rejected with HTTP 400. When omitted, no webhook is sent for the job and results are retrieved by polling. See the Webhooks management API to register endpoints.

Returns

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

create_async_image_variation(connection, model, image, opts \\ [])

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

Create async image variation Submits an image variation request for asynchronous execution. Returns a job ID immediately with HTTP 202. Poll the corresponding GET endpoint with the job ID to retrieve the result.

Parameters

  • connection (ExBifrost.Connection): Connection to server
  • model (String.t): Model identifier in format provider/model
  • image (String.t): Image file to create variations of. Use field name image for a single file or image[] for multiple (first image is used).
  • opts (keyword): Optional parameters
    • :"x-bf-async-job-result-ttl" (integer()): Time-to-live in seconds for the job result after completion. Defaults to 3600 (1 hour). After expiry, the job result is automatically cleaned up.
    • :"x-bf-async-webhook" (String.t): Name of a registered webhook endpoint to notify when this job reaches a terminal state (completed or failed). The endpoint must already exist and be enabled, and must be subscribed to the resulting event; otherwise the submission is rejected with HTTP 400. When omitted, no webhook is sent for the job and results are retrieved by polling. See the Webhooks management API to register endpoints.
    • :n (integer()): Number of variations to generate
    • :size (String.t): Size of the output images
    • :response_format (String.t): Format of the response
    • :user (String.t): User identifier for tracking
    • :fallbacks ([ExBifrost.Model.Fallback.t]): Fallback models to try if primary model fails

Returns

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

create_async_ocr(connection, ocr_request, opts \\ [])

Create async OCR job Submits an OCR request for asynchronous execution. Returns a job ID immediately with HTTP 202. Poll the corresponding GET endpoint with the job ID to retrieve the result.

Parameters

  • connection (ExBifrost.Connection): Connection to server
  • ocr_request (OcrRequest):
  • opts (keyword): Optional parameters
    • :"x-bf-async-job-result-ttl" (integer()): Time-to-live in seconds for the job result after completion. Defaults to 3600 (1 hour). After expiry, the job result is automatically cleaned up.

Returns

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

create_async_rerank(connection, rerank_request, opts \\ [])

Create async rerank Submits a rerank request for asynchronous execution. Returns a job ID immediately with HTTP 202. Poll the corresponding GET endpoint with the job ID to retrieve the result.

Parameters

  • connection (ExBifrost.Connection): Connection to server
  • rerank_request (RerankRequest):
  • opts (keyword): Optional parameters
    • :"x-bf-async-job-result-ttl" (integer()): Time-to-live in seconds for the job result after completion. Defaults to 3600 (1 hour). After expiry, the job result is automatically cleaned up.
    • :"x-bf-async-webhook" (String.t): Name of a registered webhook endpoint to notify when this job reaches a terminal state (completed or failed). The endpoint must already exist and be enabled, and must be subscribed to the resulting event; otherwise the submission is rejected with HTTP 400. When omitted, no webhook is sent for the job and results are retrieved by polling. See the Webhooks management API to register endpoints.

Returns

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

create_async_response(connection, responses_request, opts \\ [])

Create async response Submits a response request for asynchronous execution. Returns a job ID immediately with HTTP 202. Poll the corresponding GET endpoint with the job ID to retrieve the result. Streaming is not supported for async requests.

Parameters

  • connection (ExBifrost.Connection): Connection to server
  • responses_request (ResponsesRequest):
  • opts (keyword): Optional parameters
    • :"x-bf-async-job-result-ttl" (integer()): Time-to-live in seconds for the job result after completion. Defaults to 3600 (1 hour). After expiry, the job result is automatically cleaned up.
    • :"x-bf-async-webhook" (String.t): Name of a registered webhook endpoint to notify when this job reaches a terminal state (completed or failed). The endpoint must already exist and be enabled, and must be subscribed to the resulting event; otherwise the submission is rejected with HTTP 400. When omitted, no webhook is sent for the job and results are retrieved by polling. See the Webhooks management API to register endpoints.

Returns

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

create_async_speech(connection, speech_request, opts \\ [])

Create async speech Submits a speech synthesis request for asynchronous execution. Returns a job ID immediately with HTTP 202. Poll the corresponding GET endpoint with the job ID to retrieve the result. SSE streaming is not supported for async requests.

Parameters

  • connection (ExBifrost.Connection): Connection to server
  • speech_request (SpeechRequest):
  • opts (keyword): Optional parameters
    • :"x-bf-async-job-result-ttl" (integer()): Time-to-live in seconds for the job result after completion. Defaults to 3600 (1 hour). After expiry, the job result is automatically cleaned up.
    • :"x-bf-async-webhook" (String.t): Name of a registered webhook endpoint to notify when this job reaches a terminal state (completed or failed). The endpoint must already exist and be enabled, and must be subscribed to the resulting event; otherwise the submission is rejected with HTTP 400. When omitted, no webhook is sent for the job and results are retrieved by polling. See the Webhooks management API to register endpoints.

Returns

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

create_async_text_completion(connection, text_completion_request, opts \\ [])

Create async text completion Submits a text completion request for asynchronous execution. Returns a job ID immediately with HTTP 202. Poll the corresponding GET endpoint with the job ID to retrieve the result. Streaming is not supported for async requests.

Parameters

  • connection (ExBifrost.Connection): Connection to server
  • text_completion_request (TextCompletionRequest):
  • opts (keyword): Optional parameters
    • :"x-bf-async-job-result-ttl" (integer()): Time-to-live in seconds for the job result after completion. Defaults to 3600 (1 hour). After expiry, the job result is automatically cleaned up.
    • :"x-bf-async-webhook" (String.t): Name of a registered webhook endpoint to notify when this job reaches a terminal state (completed or failed). The endpoint must already exist and be enabled, and must be subscribed to the resulting event; otherwise the submission is rejected with HTTP 400. When omitted, no webhook is sent for the job and results are retrieved by polling. See the Webhooks management API to register endpoints.

Returns

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

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

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

Create async transcription Submits a transcription request for asynchronous execution. Returns a job ID immediately with HTTP 202. Poll the corresponding GET endpoint with the job ID to retrieve the result. Streaming is not supported for async requests.

Parameters

  • connection (ExBifrost.Connection): Connection to server
  • model (String.t): Model in provider/model format
  • file (String.t): Audio file to transcribe
  • opts (keyword): Optional parameters
    • :"x-bf-async-job-result-ttl" (integer()): Time-to-live in seconds for the job result after completion. Defaults to 3600 (1 hour). After expiry, the job result is automatically cleaned up.
    • :"x-bf-async-webhook" (String.t): Name of a registered webhook endpoint to notify when this job reaches a terminal state (completed or failed). The endpoint must already exist and be enabled, and must be subscribed to the resulting event; otherwise the submission is rejected with HTTP 400. When omitted, no webhook is sent for the job and results are retrieved by polling. See the Webhooks management API to register endpoints.
    • :fallbacks ([String.t]):
    • :stream (boolean()):
    • :language (String.t):
    • :prompt (String.t):
    • :response_format (String.t):
    • :file_format (String.t):

Returns

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

get_async_chat_completion_job(connection, job_id, opts \\ [])

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

Get async chat completion job Retrieves the status and result of an async chat completion job. Returns HTTP 202 if the job is still pending or processing, HTTP 200 if completed or failed.

Parameters

  • connection (ExBifrost.Connection): Connection to server
  • job_id (String.t): The unique identifier of the async job
  • opts (keyword): Optional parameters

Returns

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

get_async_embedding_job(connection, job_id, opts \\ [])

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

Get async embedding job Retrieves the status and result of an async embedding job. Returns HTTP 202 if the job is still pending or processing, HTTP 200 if completed or failed.

Parameters

  • connection (ExBifrost.Connection): Connection to server
  • job_id (String.t): The unique identifier of the async job
  • opts (keyword): Optional parameters

Returns

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

get_async_image_edit_job(connection, job_id, opts \\ [])

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

Get async image edit job Retrieves the status and result of an async image edit job. Returns HTTP 202 if the job is still pending or processing, HTTP 200 if completed or failed.

Parameters

  • connection (ExBifrost.Connection): Connection to server
  • job_id (String.t): The unique identifier of the async job
  • opts (keyword): Optional parameters

Returns

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

get_async_image_generation_job(connection, job_id, opts \\ [])

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

Get async image generation job Retrieves the status and result of an async image generation job. Returns HTTP 202 if the job is still pending or processing, HTTP 200 if completed or failed.

Parameters

  • connection (ExBifrost.Connection): Connection to server
  • job_id (String.t): The unique identifier of the async job
  • opts (keyword): Optional parameters

Returns

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

get_async_image_variation_job(connection, job_id, opts \\ [])

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

Get async image variation job Retrieves the status and result of an async image variation job. Returns HTTP 202 if the job is still pending or processing, HTTP 200 if completed or failed.

Parameters

  • connection (ExBifrost.Connection): Connection to server
  • job_id (String.t): The unique identifier of the async job
  • opts (keyword): Optional parameters

Returns

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

get_async_ocr_job(connection, job_id, opts \\ [])

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

Get async OCR job Retrieves the status and result of an async OCR job. Returns HTTP 202 if the job is still pending or processing, HTTP 200 if completed or failed.

Parameters

  • connection (ExBifrost.Connection): Connection to server
  • job_id (String.t): The unique identifier of the async job
  • opts (keyword): Optional parameters

Returns

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

get_async_rerank_job(connection, job_id, opts \\ [])

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

Get async rerank job Retrieves the status and result of an async rerank job. Returns HTTP 202 if the job is still pending or processing, HTTP 200 if completed or failed.

Parameters

  • connection (ExBifrost.Connection): Connection to server
  • job_id (String.t): The unique identifier of the async job
  • opts (keyword): Optional parameters

Returns

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

get_async_response_job(connection, job_id, opts \\ [])

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

Get async response job Retrieves the status and result of an async response job. Returns HTTP 202 if the job is still pending or processing, HTTP 200 if completed or failed.

Parameters

  • connection (ExBifrost.Connection): Connection to server
  • job_id (String.t): The unique identifier of the async job
  • opts (keyword): Optional parameters

Returns

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

get_async_speech_job(connection, job_id, opts \\ [])

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

Get async speech job Retrieves the status and result of an async speech job. Returns HTTP 202 if the job is still pending or processing, HTTP 200 if completed or failed.

Parameters

  • connection (ExBifrost.Connection): Connection to server
  • job_id (String.t): The unique identifier of the async job
  • opts (keyword): Optional parameters

Returns

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

get_async_text_completion_job(connection, job_id, opts \\ [])

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

Get async text completion job Retrieves the status and result of an async text completion job. Returns HTTP 202 if the job is still pending or processing, HTTP 200 if completed or failed.

Parameters

  • connection (ExBifrost.Connection): Connection to server
  • job_id (String.t): The unique identifier of the async job
  • opts (keyword): Optional parameters

Returns

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

get_async_transcription_job(connection, job_id, opts \\ [])

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

Get async transcription job Retrieves the status and result of an async transcription job. Returns HTTP 202 if the job is still pending or processing, HTTP 200 if completed or failed.

Parameters

  • connection (ExBifrost.Connection): Connection to server
  • job_id (String.t): The unique identifier of the async job
  • opts (keyword): Optional parameters

Returns

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