---
title: "Create Variation"
method: POST
path: "/v1/images/variations"
tags: ["Images"]
---

# Create Variation

`POST /v1/images/variations`

Creates variations of an image. Request must be sent as multipart/form-data with `model` and `image` (or `image[]`).
Does not support streaming.

## Response `200`

Successful response. Returns JSON with generated image variation(s).

- object
  - `id` string — Unique identifier for the generation request
  - `created` integer — Unix timestamp when the image was created
  - `model` string — Model used for generation
  - `data` object[] — Array of generated images
    - `url` string, uri — URL of the generated image
    - `b64_json` string — Base64-encoded image data
    - `revised_prompt` string — Revised prompt used for generation
    - `index` integer — Index of this image
  - `background` string — Background type for the image
  - `output_format` 'png' | 'webp' | 'jpeg' — Output image format
  - `quality` string — Quality of the generated image
  - `size` '256x256' | '512x512' | '1024x1024' | '1792x1024' | '1024x1792' | '1536x1024' | '1024x1536' | 'auto' — Size of the generated image
  - `usage` object
    - `input_tokens` integer — Number of input tokens
    - `input_tokens_details` object
      - `image_tokens` integer — Tokens used for images
      - `text_tokens` integer — Tokens used for text
    - `total_tokens` integer — Total tokens used
    - `output_tokens` integer — Number of output tokens
    - `output_tokens_details` object
      - `image_tokens` integer — Tokens used for images
      - `text_tokens` integer — Tokens used for text
  - `extra_fields` BifrostResponseExtraFields — Additional fields included in responses
    - `request_type` string — Type of request that was made
    - `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 — The model that was requested
    - `model_deployment` string — The actual model deployment used
    - `latency` integer — Request latency in milliseconds
    - `chunk_index` integer — Index of the chunk for streaming responses
    - `raw_request` object — Raw request if enabled
    - `raw_response` object — Raw response if enabled
    - `cache_debug` BifrostCacheDebug
      - `cache_hit` boolean
      - `cache_id` string
      - `hit_type` string
      - `requested_provider` string
      - `requested_model` string
      - `provider_used` string
      - `model_used` string
      - `input_tokens` integer
      - `threshold` number
      - `similarity` number

## 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/revisions/f8cab88f64ea/schema)
