API429 / API reference

Additional image and video models

Additional API429 media models: images over Chat Completions, FLUX.1 controls, Midjourney modifications, image editing and video.

Reference version 3.31.0 · revised · the same text in the client portal

A separate catalogue enabled per account rather than served by default. If you do not see these models in GET /v1/models, your token is not entitled to them — ask us to enable it.

Pricing: on request. These models are billed from the actual cost of each job rather than a flat per-image rate, so the price depends on the model, size, speed tier and — for Midjourney — how many images a job returns. We quote per account; your effective charge always appears in /api/client/usage/daily and in the request log.

Image models on Chat Completions

Any Gemini image model (gemini-2.5-flash-image, gemini-3.1-flash-image, gemini-3-pro-image, …) can be called through POST /v1/chat/completions. The text of the messages becomes the prompt; image_url parts in the messages are used as the edit source. The reply carries the generated picture twice for compatibility:

{
  "object": "chat.completion",
  "model": "gemini-2.5-flash-image",
  "choices": [{
    "index": 0,
    "finish_reason": "stop",
    "message": {
      "role": "assistant",
      "content": "![Generated Image 1](data:image/png;base64,...)",
      "images": [{"type": "image_url", "image_url": {"url": "data:image/png;base64,..."}}]
    }
  }],
  "usage": {
    "prompt_tokens": 14,
    "completion_tokens": 1290,
    "total_tokens": 1304,
    "completion_tokens_details": {"reasoning_tokens": 0, "image_tokens": 1290},
    "image_count": 1
  }
}
  • message.images is the field to read programmatically; content keeps the markdown rendering for clients that only display text.
  • usage mirrors Google's accounting the same way the Gemini-native endpoint does: the prompt's text tokens plus 1290 per reference image in prompt_tokens, and 1290 per generated image in completion_tokens / completion_tokens_details.image_tokens. image_count is the number of generated pictures — the unit the request is billed by.
  • Billing is per generated image at the model's catalog image rate; the token figures are for reconciliation and are not charged separately.
  • With stream: true the response is one SSE event carrying delta.content and delta.images, a finish chunk and data: [DONE]. Pass stream_options: {"include_usage": true} to receive a usage chunk (empty choices) before [DONE].
  • If the model returns no image the request fails with 502 and is not billed.

Image generation

Model Notes
midjourney Midjourney, current default version (8.1, standard queue). Returns 4 images per job
midjourney-6.1-relax / midjourney-6.1-fast Version 6.1
midjourney-7.0-relax / midjourney-7.0-fast Version 7.0
midjourney-8.1-relax / midjourney-8.1-fast Version 8.1
flux-1 FLUX.1; optional checkpoint_id, sampler_id, steps, and style controls
qwen-image Qwen Images, text-to-image
sora-images Sora Images
dalle-3 DALL·E 3

Midjourney flags (--ar, --s, --cref, --sref, --ow, …) are written inside prompt and passed through unchanged, so references and blends work as they do upstream. The request-level size / aspect_ratio fields are ignored for these models — use --ar in the prompt instead.

A generation job always produces 4 images, you are billed for the job as a whole, and all four are returned by default. Pass n explicitly only if you want fewer back — it does not reduce the price.

FLUX.1 controls

Use either flux-1 or flux.1 with POST /v1/images/generations. When omitted, the defaults are checkpoint_id=1, sampler_id=1, and steps=20.

Field Accepted value
checkpoint_id Positive integer. checkpointId is an alias.
sampler_id Positive integer. samplerId is an alias.
steps Integer from 10 through 30.
style One to three unique comma-separated indices from 0 through 49. 0 and 1 may only be used alone.
curl https://gateway.api429.com/v1/images/generations \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"flux-1","prompt":"A sunlit botanical illustration of native wildflowers, delicate ink lines and soft watercolor washes","checkpoint_id":5,"sampler_id":6,"steps":25,"style":"3,6,12"}'

The following authenticated discovery endpoints are non-billable:

  • GET /v1/yesai/flux/checkpoints
  • GET /v1/yesai/flux/samplers
  • GET /v1/yesai/flux/lora/models

LoRA remains prompt syntax: <lora:model_id:weight>. These controls add no public model and do not change routing for Qwen, Nano Banana, Veo, or Gemini Omni.

Midjourney modifications

Every generated image comes back with an id. Pass it as source_image_id together with one of the models below to act on that image. No prompt is needed except for mj-remix.

Model Result
mj-upscale Upscale ×2, faithful to the original. Returns 1 image
mj-upscale-creative Upscale ×2, adds invented detail. Returns 1 image
mj-outpaint-x2 Extend on all four sides, area ×2
mj-outpaint-x1.5 Extend on all four sides, area ×1.5
mj-outpaint-left / mj-outpaint-right / mj-outpaint-up / mj-outpaint-down Extend in one direction
mj-variations-subtle Variations close to the original
mj-variations-strong Variations only loosely related
mj-remix Re-render from new text — requires prompt
# 1) generate — note the id on each returned image
curl https://gateway.api429.com/v1/images/generations \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model": "midjourney", "prompt": "a red fox in the snow --ar 16:9"}'

# 2) upscale the one you liked
curl https://gateway.api429.com/v1/images/generations \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model": "mj-upscale", "source_image_id": "103"}'

source_image_id is the numeric image id, not the image URL. An id we cannot act on returns 400 rather than quietly producing something else.

Queue speed. Generations and modifications run on the relax queue by default (1–12 minutes). Add "speed": "fast" to any Midjourney request to use the fast queue (1–3 minutes) — it works for the mj-* modification models too, which carry no speed word of their own. speed beats the speed in the model alias, so midjourney-7.0-relax with "speed": "fast" runs fast.

Image editing

Model Result
qwen-image-edit Edit by text instruction
qwen-image-remove-bg Remove the background
qwen-image-remove-watermark Remove watermarks
qwen-image-colorize-1 / qwen-image-colorize-2 Colourise
qwen-image-restore Restore damaged or low-quality photos
qwen-image-contour Contour / line extraction
qwen-image-depth Depth map
qwen-image-extract-clothing Extract clothing
qwen-image-make-old / qwen-image-make-young Age the subject up or down
qwen-image-stylize Apply a style
qwen-image-3d 3D-style render
acc-upper / acc-lower / acc-full Replace clothing from a photo — upper body, lower body, or full outfit

Video

Model Result
veo Text-to-video
kling Animate a still image
pika Animate a still image, Pika engine
deepface-video Face replacement in video
video-upscale Upscale an existing video

Video jobs are long-running: submit, then poll for the result the same way as the other asynchronous media endpoints.

Quickstart: the first request · Models and prices · Get an API key

Telegram