---
title: "Create async chat completion"
method: POST
path: "/v1/async/chat/completions"
tags: ["Async Jobs"]
---

# Create async chat completion

`POST /v1/async/chat/completions`

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.

## Headers

- `x-bf-async-job-result-ttl` integer
- `x-bf-async-webhook` string

## Request body

- ChatCompletionRequest
  - `model` string, required — Model in provider/model format (e.g., openai/gpt-4)
  - `messages` ChatMessage[], required — List of messages in the conversation
    - `role` 'assistant' | 'user' | 'system' | 'tool' | 'developer', required
    - `name` string
    - `content` union — Message content - can be a string or array of content blocks
      - string
      - object[]
        - `type` 'text' | 'image_url' | 'input_audio' | 'file' | 'refusal', required
        - `text` string
        - `refusal` string
        - `image_url` object
          - `url` string, required
          - `detail` 'low' | 'high' | 'auto'
        - `input_audio` object
          - `data` string, required
          - `format` string
        - `file` object
          - `file_data` string
          - `file_id` string
          - `filename` string
          - `file_type` string
        - `cache_control` CacheControl — Cache control settings for content blocks
          - `type` 'ephemeral'
          - `ttl` string — Time to live (e.g., "1m", "1h")
    - `tool_call_id` string — For tool messages
    - `refusal` string
    - `audio` object
      - `id` string
      - `data` string
      - `expires_at` integer
      - `transcript` string
    - `reasoning` string
    - `reasoning_details` object[]
      - `id` string
      - `index` integer
      - `type` 'reasoning.summary' | 'reasoning.encrypted' | 'reasoning.text'
      - `summary` string
      - `text` string
      - `signature` string
      - `data` string
    - `annotations` object[]
      - `type` string
      - `url_citation` object
        - `start_index` integer
        - `end_index` integer
        - `title` string
        - `url` string
        - `sources` object
        - `type` string
    - `tool_calls` object[]
      - `index` integer
      - `type` string
      - `id` string
      - `function` object, required
        - `name` string
        - `arguments` string
  - `fallbacks` string[] — Fallback models in provider/model format
  - `stream` boolean — Whether to stream the response
  - `frequency_penalty` number
  - `logit_bias` object
  - `logprobs` boolean
  - `max_completion_tokens` integer
  - `metadata` object
  - `modalities` string[]
  - `parallel_tool_calls` boolean
  - `presence_penalty` number
  - `prompt_cache_key` string
  - `reasoning` object
    - `effort` 'none' | 'minimal' | 'low' | 'medium' | 'high' | 'xhigh' — Reasoning effort level
    - `max_tokens` integer
  - `response_format` object — Format for the response
  - `safety_identifier` string
  - `service_tier` string
  - `stream_options` object
    - `include_obfuscation` boolean
    - `include_usage` boolean
  - `store` boolean
  - `temperature` number
  - `tool_choice` union
    - 'none' | 'auto' | 'required'
    - object
      - `type` 'none' | 'any' | 'required' | 'function' | 'allowed_tools' | 'custom', required
      - `function` object
        - `name` string, required
      - `allowed_tools` object
        - `mode` 'auto' | 'required'
        - `tools` object[]
          - `type` string, required
          - `function` object
            - `name` string, required
  - `tools` object[]
    - `type` 'function' | 'custom', required
    - `function` object
      - `name` string, required
      - `description` string
      - `parameters` object
        - `type` string
        - `description` string
        - `required` string[]
        - `properties` object
        - `enum` string[]
        - `additionalProperties` boolean
      - `strict` boolean
    - `custom` object
      - `format` object
        - `type` string, required
        - `grammar` object
          - `definition` string, required
          - `syntax` 'lark' | 'regex', required
    - `cache_control` CacheControl — Cache control settings for content blocks
      - `type` 'ephemeral'
      - `ttl` string — Time to live (e.g., "1m", "1h")
  - `seed` integer — Deterministic sampling seed
  - `top_p` number — Nucleus sampling parameter
  - `top_logprobs` integer — Number of most likely tokens to return at each position
  - `stop` union — Up to 4 sequences where the API will stop generating tokens
    - string
    - string[]
  - `prediction` object — Predicted output content for the model to reference (OpenAI only). Can reduce latency.
    - `type` string — Always "content"
    - `content` union — Predicted content (string or array of content parts)
      - string
      - object[]
  - `prompt_cache_retention` 'in_memory' | '24h' — Prompt cache retention policy
  - `web_search_options` object — Web search options for chat completions (OpenAI only)
    - `search_context_size` 'low' | 'medium' | 'high' — Amount of search context to include
    - `user_location` object
      - `type` string — Location type (e.g., "approximate")
      - `approximate` object
        - `city` string
        - `country` string — Two-letter ISO country code (e.g., "US")
        - `region` string — Region or state (e.g., "California")
        - `timezone` string — IANA timezone (e.g., "America/Los_Angeles")
  - `truncation` string
  - `user` string
  - `verbosity` 'low' | 'medium' | 'high'

## Response `202`

Job accepted for processing

- AsyncJobResponse — Response returned when creating or polling an async job
  - `id` string, required — Unique identifier for the async job
  - `status` 'pending' | 'processing' | 'completed' | 'failed', required — The status of an async job
  - `expires_at` string, date-time — When the job result expires and will be cleaned up
  - `created_at` string, date-time, required — When the job was created
  - `completed_at` string, date-time — When the job completed (successfully or with failure)
  - `status_code` integer — HTTP status code of the completed operation
  - `result` unknown
  - `error` BifrostError — Error response from Bifrost
    - `event_id` string
    - `type` string
    - `is_bifrost_error` boolean
    - `status_code` integer
    - `error` ErrorField
      - `type` string
      - `code` string
      - `message` string
      - `param` string
      - `event_id` string
    - `extra_fields` BifrostErrorExtraFields
      - `provider` 'openai' | 'azure' | 'anthropic' | 'bedrock' | 'cohere' | 'vertex' | 'vllm' | 'mistral' | 'ollama' | 'groq' | 'sgl' | 'parasail' | 'perplexity' | 'replicate' | 'cerebras' | 'deepseek' | 'gemini' | 'openrouter' | 'elevenlabs' | 'huggingface' | 'nebius' | 'xai' | 'runway' | 'fireworks' — AI model provider identifier
      - `model_requested` string
      - `request_type` string

## Other responses

- `400` — Bad request
- `500` — Internal server error

---

[API](https://skmtc.net/getbifrost/apis/bifrost-api.md) · [All operations](https://skmtc.net/getbifrost/apis/bifrost-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/getbifrost/bifrost-api/versions/f8cab88f64ea/schema)
