Usage > V1 > OpenAI-compatible

Create image

Creates an image given a prompt.<br> This route is mostly OpenAI-compliant, see the OpenAI documentation.<br> Supports English primarily, with limited understanding of French (FR), German (DE), Spanish (ES), and Italian (IT).

post/1/ai/{product_id}/openai/images/generations

Path parameters

product_idinteger required

AI Tools product identifier: use GET /1/ai to retrieve your product identifier.

Request body

modelstring required

Model name to use

ninteger

The number of images to generate (default: 1)

negative_promptstring

The prompt does not guide the image generation. The maximum length is 77 tokens, Note that the "sdxl_lightning" and "flux" model does not support this feature.

promptstring required

A text description of the desired image(s). The maximum length is 77 tokens

quality'hd' | 'standard'

The quality of the image that will be generated (default: standard)

response_format'b64_json' | 'url'

The format in which the generated images are returned. Currently, only 'b64_json' is supported as the response format

size'1024x1024' | '1024x1792' | '1792x1024'

The size of the generated images.

style'cinematic' | 'comic_book' | 'digital_art' | 'disney_charactor' | 'enhance' | 'fantasy_art' | 'line_art' | 'lowpoly' | 'neonpunk' | 'photographic'

Change the style to guidance for the generation

syncboolean

Example request

{
  "model": "sdxl_lightning",
  "negative_prompt": "asymmetry, worst quality, low quality",
  "prompt": "A cute cat",
  "quality": "standard",
  "response_format": "b64_json",
  "size": "1024x1024",
  "style": "neonpunk"
}

Response

OK

createdinteger required

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

Changes

No recorded changes to this endpoint across all 2 revisions of this API.