---
title: "Create async image generation"
method: POST
path: "/v1/async/images/generations"
tags: ["Async Jobs"]
---

# Create async image generation

`POST /v1/async/images/generations`

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.

## Headers

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

## Request body

- object
  - `model` string, required — Model identifier in format `provider/model`
  - `prompt` string, required — Text prompt to generate image
  - `n` integer — Number of images to generate
  - `size` '256x256' | '512x512' | '1024x1024' | '1792x1024' | '1024x1792' | '1536x1024' | '1024x1536' | 'auto' — Size of the generated image
  - `quality` 'auto' | 'high' | 'medium' | 'low' | 'hd' | 'standard' — Quality of the generated image
  - `style` 'natural' | 'vivid' — Style of the generated image
  - `response_format` 'url' | 'b64_json' — Format of the response.
  - `background` 'transparent' | 'opaque' | 'auto' — Background type for the image
  - `moderation` 'low' | 'auto' — Content moderation level
  - `partial_images` integer — Number of partial images to generate
  - `output_compression` integer — Compression level (0-100%)
  - `output_format` 'png' | 'webp' | 'jpeg' — Output image format
  - `user` string — User identifier for tracking
  - `seed` integer — Seed for reproducible image generation
  - `negative_prompt` string — Negative prompt to guide what to avoid in generation
  - `num_inference_steps` integer — Number of inference steps for generation
  - `stream` boolean — Whether to stream the response. When true, images are sent as SSE. When streaming, providers may return base64 chunks (`b64_json`) and/or URLs (`url`) depending on provider and configuration.
  - `fallbacks` Fallback[] — Fallback models to try if primary model fails
    - `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', required — AI model provider identifier
    - `model` string, required — Model name

## 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)
