API Reference

Base URL, authentication, endpoints, response format and error codes for the API.

This page covers the mechanics shared by every model. For model-specific parameters and examples, see Image Models, and Video Models.

Base URL

https://reve2img.com

Authentication

All requests require an API key, passed as a Bearer token:

Authorization: Bearer sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Create and manage keys at Settings → API Keys (reve2img.com/settings/apikeys). Keep your key secret — it can spend your account credits. Use it from a server, never in client-side code.

Core endpoints

MethodEndpointPurpose
POST/api/v1/generateCreate a generation task.
GET/api/v1/status?task_id={id}Get a task's status and results.

Create a task

POST /api/v1/generate

The request body always includes a model; the media type (image or video) and scene are inferred from it. These fields are common to all models:

FieldTypeRequiredDescription
modelstringYesThe model id. See the model category pages for the full list.
promptstringUsuallyText description. Required for image and text/image-to-video.

Each category adds its own fields (e.g. image_urls, aspect_ratio, duration, resolution, generate_audio). See the category pages.

Response

{
  "code": 200,
  "message": "success",
  "data": { "task_id": "abc123", "status": "IN_PROGRESS" }
}

Synchronous models (e.g. Reve 2.0) may return SUCCESS with response.resultUrls right away; everything else returns IN_PROGRESS — poll the status endpoint.

Get task status

GET /api/v1/status?task_id={task_id}
Query paramTypeRequiredDescription
task_idstringYesThe id returned by /api/v1/generate.

Poll every 2–5 seconds until status is SUCCESS or FAILED. Polling too fast simply returns the current state (it is not an error).

{
  "code": 200,
  "message": "success",
  "data": {
    "task_id": "abc123",
    "status": "SUCCESS",
    "consumed_credits": 12,
    "response": { "resultUrls": ["https://cdn.reve2img.com/...."] }
  }
}

On failure, status is FAILED and data.error contains a code and message. Failed tasks are not charged.

Response format

Every response uses a consistent envelope:

{ "code": 200, "message": "success", "data": { /* ... */ } }

Successful requests return code: 200. Errors return the HTTP status code in both the HTTP response and code, with a machine-readable message and an optional detail.

Task statuses

StatusMeaning
IN_PROGRESSQueued or running. Keep polling.
SUCCESSDone. File URLs are in response.resultUrls.
FAILEDThe task failed. See error. No credits charged.

Credits

Credits are deducted from your account balance when a task is created, and the exact amount is returned as consumed_credits on success. Pricing depends on the model (and on resolution / duration / options) — see each category page. Failed tasks are refunded automatically. Top up at Settings → Credits.

Errors

{ "code": 401, "message": "INVALID_API_KEY", "detail": "Missing or invalid API key." }
HTTPmessageMeaning
400INVALID_PROMPTprompt is missing or empty.
400INVALID_MODELUnknown or missing model.
400INVALID_PARAMETERInvalid JSON, or a parameter is invalid / missing.
400CONTENT_POLICY_VIOLATIONPrompt or output rejected by content moderation.
401INVALID_API_KEYMissing, malformed, unknown, or revoked API key.
402INSUFFICIENT_CREDITSNot enough credits for this request.
404TASK_NOT_FOUNDNo task with that task_id belongs to your account.
429RATE_LIMITEDToo many requests — slow down.
429TOO_MANY_TASKSToo many tasks in flight — wait for them to finish.
500GENERATION_FAILEDInternal error. Safe to retry.
503SERVICE_UNAVAILABLEUpstream model temporarily unavailable.
504TIMEOUTThe task timed out.