Images

Create an image variation

Creates a variation of a given image using the OpenAI-compatible Images API. The request is sent as multipart/form-data with the image file as a binary upload.

Not every provider implements the Images API. Requests routed to a provider that does not support it return 400 Bad Request with an explanatory error message; use /chat/completions for those providers.

post/images/variations

Query parameters

provider'ollama' | 'ollama_cloud' | 'groq' | 'llamacpp' | 'openai' | 'cloudflare' | 'cohere' | 'anthropic' | 'deepseek' | 'google' | 'mistral' | 'minimax' | 'moonshot' | 'nvidia' | 'zai'

Specific provider to use (default determined by model)

Response

Successful response

createdinteger required

The Unix timestamp (in seconds) of when the image was created.

Changes

Changed in 2 of the 55 revisions of this API.19

    • request property size was restricted to a list of enum values

      request-property-became-enum

    • added the new 1024x1024 enum value to the request property size

      request-property-enum-value-added

    • added the new 1024x1536 enum value to the request property size

      request-property-enum-value-added

    • added the new 1024x1792 enum value to the request property size

      request-property-enum-value-added

    • added the new 1536x1024 enum value to the request property size

      request-property-enum-value-added

    • added the new 1792x1024 enum value to the request property size

      request-property-enum-value-added

    • added the new 256x256 enum value to the request property size

      request-property-enum-value-added

    • added the new 512x512 enum value to the request property size

      request-property-enum-value-added

    • added the new auto enum value to the request property size

      request-property-enum-value-added

    • endpoint added

      endpoint-added