An OpenAI Images-compatible API. Image models such as GPT Image, Seedream, FLUX, and Grok Imagine all generate images through it. To switch models, change model and a few model-specific parameters.POST https://studio.dataeyes.ai/v1/images/generations
Models at a glance#
| Series | Example models | Returns | Notes |
|---|
| GPT Image | gpt-image-2 | Base64 (b64_json) | Also supports image editing via POST /v1/images/edits |
| Seedream | ByteDance-Seedream-5.0 | URL | See below |
| FLUX | flux-3-image, flux-2-max, flux-kontext-max | URL | See below |
| Grok Imagine | grok-imagine-image-2.0, grok-imagine-image | URL or Base64 | Grok Imagine Image |
For all available image models and prices, see the Model Hub.Quick example#
Response (Base64 truncated):{
"created": 1792856918,
"data": [
{
"b64_json": "iVBORw0KGgoAAAANSUhEUgAABAAAAAQACAIAAADwf7zU…",
"revised_prompt": "A shiba inu wearing headphones, flat illustration, white background"
}
],
"usage": {
"input_tokens": 12,
"output_tokens": 272,
"total_tokens": 284
}
}
Request parameters#
Supported parameters vary by model. The table lists common parameters and where they apply:| Parameter | Type | Required | Applies to | Description |
|---|
model | string | Yes | All | Model name |
prompt | string | Yes | All | Image description |
size | string | No | All | GPT Image, for example 1024x1024; Seedream, for example 2K |
quality | string | No | GPT Image | low, medium, high. Higher is slower and costs more |
n | integer | No | GPT Image | Number of images. Keep it at 1 and send concurrent requests if you need more |
response_format | string | No | Seedream | Pass url to get an image URL |
image | string / array | No | Seedream, FLUX | Reference image URL or Base64, for image-to-image and multi-image fusion |
watermark | boolean | No | Seedream | Whether to add a watermark |
Some models cannot generate multiple images in one request. With n greater than 1, they may return only one image. If you need several images, send several requests with n set to 1.
Seedream#
Seedream supports text-to-image, single-image reference, and multi-image fusion. Which one you get depends on whether you pass image and how many images you pass.{
"model": "seedream-5-0-260128",
"created": 1792855371,
"data": [
{
"url": "https://ark-acg-ap-southeast-1.tos-ap-southeast-1.volces.com/seedream-5-0/…jpeg?X-Tos-Expires=86400&…",
"size": "2048x2048"
}
],
"usage": { "generated_images": 1, "output_tokens": 16384, "total_tokens": 16384 }
}
FLUX#
Returns data[].url. Supported sizes and parameters vary by FLUX model; see the model details in the Model Hub.Grok Imagine#
For parameters (aspect_ratio, resolution, quality), image editing, and common errors, see Grok Imagine Image.Saving results#
URL: Image URLs expire (24 hours for Seedream and 2 hours for FLUX in our tests). Download and store images soon after generation.
Base64: Decode and write to a file, as in the quick example above.
FAQ#