API calls for all endpoints tagged AnthropicIntegration.
Summary
Functions
Cancel batch job (Anthropic format) Cancels a batch processing job.
Count tokens (Anthropic format) Counts the number of tokens in a message request.
Create batch job (Anthropic format) Creates a batch processing job using Anthropic format. Use x-model-provider header to specify the provider.
Create completion (Anthropic legacy format) Creates a text completion using Anthropic's legacy Complete API. Supports streaming via SSE.
Create message (Anthropic format)
Creates a message using Anthropic Messages 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 will have an empty content array. When completed, content will contain the full result. See Async Inference for details.
Create message (Anthropic format) - wildcard Handles extended messages API paths.
Delete file (Anthropic format) Deletes an uploaded file.
Get batch results (Anthropic format) Retrieves results of a completed batch job.
Get file content (Anthropic format) Retrieves file content. Returns raw binary file data when Accept header is set to application/octet-stream, or file metadata as JSON when Accept header is set to application/json.
List batch jobs (Anthropic format) Lists batch processing jobs.
List files (Anthropic format) Lists uploaded files.
List models (Anthropic format) Lists available models in Anthropic format.
Retrieve batch job (Anthropic format) Retrieves details of a batch processing job.
Upload file (Anthropic format) Uploads a file. Use x-model-provider header to specify the provider.
Functions
@spec anthropic_cancel_batch(Tesla.Env.client(), String.t(), keyword()) :: {:ok, ExBifrost.Model.AnthropicCreateMessage400Response.t()} | {:ok, ExBifrost.Model.AnthropicListBatches200ResponseDataInner.t()} | {:error, Tesla.Env.t()}
Cancel batch job (Anthropic format) Cancels a batch processing job.
Parameters
connection(ExBifrost.Connection): Connection to serverbatch_id(String.t): Batch job ID to cancelopts(keyword): Optional parameters:"x-model-provider"(String.t): Provider for the batch
Returns
{:ok, ExBifrost.Model.AnthropicListBatches200ResponseDataInner.t}on success{:error, Tesla.Env.t}on failure
@spec anthropic_count_tokens( Tesla.Env.client(), ExBifrost.Model.AnthropicMessageRequest.t(), keyword() ) :: {:ok, ExBifrost.Model.AnthropicCreateMessage400Response.t()} | {:ok, ExBifrost.Model.AnthropicCountTokens200Response.t()} | {:error, Tesla.Env.t()}
Count tokens (Anthropic format) Counts the number of tokens in a message request.
Parameters
connection(ExBifrost.Connection): Connection to serveranthropic_message_request(AnthropicMessageRequest):opts(keyword): Optional parameters
Returns
{:ok, ExBifrost.Model.AnthropicCountTokens200Response.t}on success{:error, Tesla.Env.t}on failure
@spec anthropic_create_batch( Tesla.Env.client(), ExBifrost.Model.AnthropicCreateBatchRequest.t(), keyword() ) :: {:ok, ExBifrost.Model.AnthropicCreateMessage400Response.t()} | {:ok, ExBifrost.Model.AnthropicListBatches200ResponseDataInner.t()} | {:error, Tesla.Env.t()}
Create batch job (Anthropic format) Creates a batch processing job using Anthropic format. Use x-model-provider header to specify the provider.
Parameters
connection(ExBifrost.Connection): Connection to serveranthropic_create_batch_request(AnthropicCreateBatchRequest):opts(keyword): Optional parameters:"x-model-provider"(String.t): Provider to use (defaults to anthropic)
Returns
{:ok, ExBifrost.Model.AnthropicListBatches200ResponseDataInner.t}on success{:error, Tesla.Env.t}on failure
@spec anthropic_create_complete( Tesla.Env.client(), ExBifrost.Model.AnthropicTextRequest.t(), keyword() ) :: {:ok, ExBifrost.Model.AnthropicCreateMessage400Response.t()} | {:ok, ExBifrost.Model.AnthropicCreateComplete200Response.t()} | {:error, Tesla.Env.t()}
Create completion (Anthropic legacy format) Creates a text completion using Anthropic's legacy Complete API. Supports streaming via SSE.
Parameters
connection(ExBifrost.Connection): Connection to serveranthropic_text_request(AnthropicTextRequest):opts(keyword): Optional parameters
Returns
{:ok, ExBifrost.Model.AnthropicCreateComplete200Response.t}on success{:error, Tesla.Env.t}on failure
@spec anthropic_create_message( Tesla.Env.client(), ExBifrost.Model.AnthropicMessageRequest.t(), keyword() ) :: {:ok, ExBifrost.Model.AnthropicCreateMessage400Response.t()} | {:ok, ExBifrost.Model.AnthropicMessageResponse.t()} | {:error, Tesla.Env.t()}
Create message (Anthropic format)
Creates a message using Anthropic Messages 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 will have an empty content array. When completed, content will contain the full result. See Async Inference for details.
Parameters
connection(ExBifrost.Connection): Connection to serveranthropic_message_request(AnthropicMessageRequest):opts(keyword): Optional parameters:"x-bf-async"(String.t): Set totrueto 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.AnthropicMessageResponse.t}on success{:error, Tesla.Env.t}on failure
@spec anthropic_create_message_wildcard( Tesla.Env.client(), String.t(), ExBifrost.Model.AnthropicMessageRequest.t(), keyword() ) :: {:ok, ExBifrost.Model.AnthropicCreateMessage400Response.t()} | {:ok, ExBifrost.Model.AnthropicMessageResponse.t()} | {:error, Tesla.Env.t()}
Create message (Anthropic format) - wildcard Handles extended messages API paths.
Parameters
connection(ExBifrost.Connection): Connection to serverpath(String.t): Extended pathanthropic_message_request(AnthropicMessageRequest):opts(keyword): Optional parameters
Returns
{:ok, ExBifrost.Model.AnthropicMessageResponse.t}on success{:error, Tesla.Env.t}on failure
@spec anthropic_delete_file(Tesla.Env.client(), String.t(), keyword()) :: {:ok, ExBifrost.Model.AnthropicCreateMessage400Response.t()} | {:ok, ExBifrost.Model.AnthropicDeleteFile200Response.t()} | {:error, Tesla.Env.t()}
Delete file (Anthropic format) Deletes an uploaded file.
Parameters
connection(ExBifrost.Connection): Connection to serverfile_id(String.t): File ID to deleteopts(keyword): Optional parameters:"x-model-provider"(String.t): Provider for the file
Returns
{:ok, ExBifrost.Model.AnthropicDeleteFile200Response.t}on success{:error, Tesla.Env.t}on failure
@spec anthropic_get_batch_results(Tesla.Env.client(), String.t(), keyword()) :: {:ok, ExBifrost.Model.AnthropicCreateMessage400Response.t()} | {:ok, String.t()} | {:error, Tesla.Env.t()}
Get batch results (Anthropic format) Retrieves results of a completed batch job.
Parameters
connection(ExBifrost.Connection): Connection to serverbatch_id(String.t): Batch job IDopts(keyword): Optional parameters:"x-model-provider"(String.t): Provider for the batch
Returns
{:ok, String.t}on success{:error, Tesla.Env.t}on failure
@spec anthropic_get_file_content(Tesla.Env.client(), String.t(), keyword()) :: {:ok, ExBifrost.Model.AnthropicCreateMessage400Response.t()} | {:ok, ExBifrost.Model.AnthropicListFiles200ResponseDataInner.t()} | {:error, Tesla.Env.t()}
Get file content (Anthropic format) Retrieves file content. Returns raw binary file data when Accept header is set to application/octet-stream, or file metadata as JSON when Accept header is set to application/json.
Parameters
connection(ExBifrost.Connection): Connection to serverfile_id(String.t): File IDopts(keyword): Optional parameters:"x-model-provider"(String.t): Provider for the file:Accept(String.t): Response content type - use application/octet-stream for binary download
Returns
{:ok, ExBifrost.Model.AnthropicListFiles200ResponseDataInner.t}on success{:error, Tesla.Env.t}on failure
@spec anthropic_list_batches( Tesla.Env.client(), keyword() ) :: {:ok, ExBifrost.Model.AnthropicListBatches200Response.t()} | {:ok, ExBifrost.Model.AnthropicCreateMessage400Response.t()} | {:error, Tesla.Env.t()}
List batch jobs (Anthropic format) Lists batch processing jobs.
Parameters
connection(ExBifrost.Connection): Connection to serveropts(keyword): Optional parameters:"x-model-provider"(String.t): Provider to use (defaults to anthropic):page_size(integer()): Maximum number of batches to return:page_token(String.t): Cursor for pagination
Returns
{:ok, ExBifrost.Model.AnthropicListBatches200Response.t}on success{:error, Tesla.Env.t}on failure
@spec anthropic_list_files( Tesla.Env.client(), keyword() ) :: {:ok, ExBifrost.Model.AnthropicCreateMessage400Response.t()} | {:ok, ExBifrost.Model.AnthropicListFiles200Response.t()} | {:error, Tesla.Env.t()}
List files (Anthropic format) Lists uploaded files.
Parameters
connection(ExBifrost.Connection): Connection to serveropts(keyword): Optional parameters:"x-model-provider"(String.t): Provider to use (defaults to anthropic):limit(integer()): Maximum files to return:after_id(String.t): Cursor for pagination
Returns
{:ok, ExBifrost.Model.AnthropicListFiles200Response.t}on success{:error, Tesla.Env.t}on failure
@spec anthropic_list_models( Tesla.Env.client(), keyword() ) :: {:ok, ExBifrost.Model.AnthropicCreateMessage400Response.t()} | {:ok, ExBifrost.Model.AnthropicListModelsResponse.t()} | {:error, Tesla.Env.t()}
List models (Anthropic format) Lists available models in Anthropic format.
Parameters
connection(ExBifrost.Connection): Connection to serveropts(keyword): Optional parameters:limit(integer()): Maximum number of models to return:before_id(String.t): Return models before this ID:after_id(String.t): Return models after this ID
Returns
{:ok, ExBifrost.Model.AnthropicListModelsResponse.t}on success{:error, Tesla.Env.t}on failure
@spec anthropic_retrieve_batch(Tesla.Env.client(), String.t(), keyword()) :: {:ok, ExBifrost.Model.AnthropicCreateMessage400Response.t()} | {:ok, ExBifrost.Model.AnthropicListBatches200ResponseDataInner.t()} | {:error, Tesla.Env.t()}
Retrieve batch job (Anthropic format) Retrieves details of a batch processing job.
Parameters
connection(ExBifrost.Connection): Connection to serverbatch_id(String.t): Batch job IDopts(keyword): Optional parameters:"x-model-provider"(String.t): Provider for the batch
Returns
{:ok, ExBifrost.Model.AnthropicListBatches200ResponseDataInner.t}on success{:error, Tesla.Env.t}on failure
@spec anthropic_upload_file(Tesla.Env.client(), String.t(), keyword()) :: {:ok, ExBifrost.Model.AnthropicCreateMessage400Response.t()} | {:ok, ExBifrost.Model.AnthropicListFiles200ResponseDataInner.t()} | {:error, Tesla.Env.t()}
Upload file (Anthropic format) Uploads a file. Use x-model-provider header to specify the provider.
Parameters
connection(ExBifrost.Connection): Connection to serverfile(String.t): File to upload (raw file content)opts(keyword): Optional parameters:"x-model-provider"(String.t): Provider to use (defaults to anthropic):filename(String.t): Original filename:purpose(String.t): Purpose of the file (e.g., \"batch\")
Returns
{:ok, ExBifrost.Model.AnthropicListFiles200ResponseDataInner.t}on success{:error, Tesla.Env.t}on failure