HomeGuidesAPI ReferenceChangelogDiscussions
Hire a ReactVision Expert 🛠️Launch Studio 🖥️Sponsor on GitHub ❤️Log In
API Reference

Generate an image

Secret key only.

A few legacy keys that ReactVision has listed keep access for a transitional period. Every other legacy key, and every client key, is refused with 403 API_KEY_TYPE_NOT_ALLOWED.

Generates an image from a text prompt, or edits an earlier image with reference_image_url, and stores it. The call waits for the image: the task comes back completed, with the file in result.

Without app_user_id the image goes into the team library (result.team_asset_id). With app_user_id and project_id it is stored as a file of that project for that app user (result.user_asset_id), which is deleted 90 days after it is created.

Credits per image, from the team's monthly AI credit budget: gemini-3.1-flash-lite-image 15, gemini-3.1-flash-image 25, gemini-3-pro-image 49 (the default). The image also counts against the storage quota. No model produces a transparent background.

A key bound to one project must send project_id (its own project) and app_user_id: its output is stored in that project for the app user, never in the team library, so scene_id placement is not available to a bound key. Without them it gets 403 ACCESS_DENIED.

Not counted against the monthly API request quota.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Body Params
string
required
length ≤ 2000

What to generate, or how to change the reference image. Up to 2000 characters after trimming.

string
enum
Defaults to gemini-3-pro-image

Default gemini-3-pro-image.

Allowed:
string

An image in this platform's storage, such as an earlier result.file_url, to edit. If it cannot be read, a new image is generated from the prompt alone.

string

The team_asset_id or user_asset_id of an image this operation generated earlier for your team through an API key (or for a member whose account was since deleted), deleted once the new image is stored. Any other asset is left in place. For a bound key it must be a file of its project.

uuid

A scene of your team. Sets the project; no placement is made.

uuid

A project of your team. Required with app_user_id.

string
length ≤ 255

Your app's id for the user. Stores the image as that user's file instead of in the team library. Up to 255 characters; not with scene_id.

Responses

INVALID_BODY: the body is not valid JSON.

MISSING_PROMPT: no prompt, or an empty one.

INVALID_MODEL: model is not one of the three models.

INVALID_REFERENCE_IMAGE_URL: reference_image_url is not a storage URL of this platform.

INVALID_COMBINATION: app_user_id with scene_id.

APP_USER_ID_TOO_LONG: app_user_id is over 255 characters.

PROMPT_TOO_LONG: prompt is over 2000 characters.

INVALID_SCENE: scene_id names no scene.

MISSING_PROJECT_ID: app_user_id without project_id.

MISSING_AUTH: no x-api-key header, and no other credential.

INVALID_API_KEY_FORMAT: the key is not rv_live_, rv_client_ or rv_secret_ followed by 64 lowercase hexadecimal characters.

INVALID_API_KEY: no such key, or a key sent with the wrong prefix for its type.

API_KEY_EXPIRED: the key is past its expiry date.

AUTH_ERROR: a user token (rv_ut_) was sent as a Bearer token. This operation does not accept user tokens.

API_KEY_TYPE_NOT_ALLOWED: a client key, or a legacy key that is not on ReactVision's transitional list.

ACCESS_DENIED: a bound key sent neither project_id nor scene_id.

SCENE_ACCESS_DENIED: scene_id is a scene the key cannot reach.

PROJECT_ACCESS_DENIED: project_id does not exist or the key cannot reach it.

LIMIT_REACHED: the generation would exceed the team's monthly AI credit budget, or the budget could not be read.

STORAGE_LIMIT_REACHED: the team is over its storage quota, or the quota could not be read.

ASSET_NOT_FOUND: a bound key sent a replace_asset_id that is not a file of its project.

CONTENT_REFUSED: the model refused the prompt for safety or content policy. Nothing is charged; reword it.

RATE_LIMITED: for a secret key, more than 1,200 requests a minute across all operations. Wait the number of seconds in Retry-After. See Limits.

UPLOAD_FAILED: the image could not be stored.

CREATE_FAILED: the task or asset could not be recorded.

INTERNAL_ERROR: an unexpected error. Retry, and quote meta.request_id to support if it persists.

GENERATION_FAILED: the model failed or returned no image. Nothing is charged; a retry may succeed.

API_KEY_LOOKUP_FAILED: the key could not be checked. Retry; this does not mean the key is invalid.

SERVICE_NOT_CONFIGURED: image generation is unavailable.

Language
Credentials
Header
LoadingLoading…
Response
Choose an example:
application/json