RawFrame
API referenceGenerations

Create a generation

POST
/v1/generations

Validates the request, reserves price_estimate credits, and queues the job. Returns 202 immediately.

Authorization

bearerAuth
headerAuthorizationBearer <token>

API key, e.g. rf_live_3f9k2q_….

Header Parameters

Idempotency-Key?string

Retries with the same key and body within 24 h return the original response.

Lengthlength <= 255

Request Body

application/json
  1. body
model*string
mode?GenerationMode

Optional; inferred from references when omitted.

Value in"text_to_image""image_edit""text_to_video""image_to_video""reference_to_video""video_edit""video_extend"
prompt*string
Length1 <= length <= 10000
references?array<|>
Itemsitems <= 16
params?

Normalized parameters. Unsupported values for the chosen model are rejected with invalid_parameters.

provider_options?

Provider-specific options passed through to the provider, at most 8 KB of JSON. They can't override the model, prompt, references or normalized params.

routing?
webhook_url?string

Optional one-off webhook in addition to configured endpoints. Not available yet: setting it is rejected with feature_not_available; use a webhook endpoint.

Match^https://
Formaturi
metadata?
Propertiesproperties <= 16

Response Body

Generation accepted.

application/json
  1. response
object*unknown
id*string
model*string
served_by?|

Model that actually ran (differs from model after a fallback).

type*MediaType
Value in"image""video"
mode*GenerationMode
Value in"text_to_image""image_edit""text_to_video""image_to_video""reference_to_video""video_edit""video_extend"
status*GenerationStatus
Value in"queued""submitting""running""finalizing""succeeded""failed""canceled"
prompt?string
params?

Normalized parameters. Unsupported values for the chosen model are rejected with invalid_parameters.

outputs?array<>
error?|null
price_estimate_micros*integer

The most this generation can cost, held from your balance until it finishes. With routing.fallbacks, the highest estimate across the chain.

Formatint64
charge_micros?|
Formatint64
metadata?
created_at*string
Formatdate-time
started_at?|
Formatdate-time
completed_at?|
Formatdate-time
curl -X POST 'https://api.rawframe.dev/v1/generations' \  -H 'Content-Type: application/json' \  -d '{  "model": "bytedance/seedance-2.5",  "prompt": "A paper boat drifting down a rain-soaked city gutter, macro lens, golden hour",  "params": {    "duration_seconds": 5,    "aspect_ratio": "16:9",    "resolution": "1080p",    "audio": true  }}'
Example Response
{  "object": "generation",  "id": "gen_01jbxa3m4n5p6q7r8s9t",  "model": "string",  "served_by": "string",  "type": "image",  "mode": "text_to_image",  "status": "queued",  "prompt": "string",  "params": {    "duration_seconds": 1,    "aspect_ratio": "string",    "resolution": "string",    "num_outputs": 1,    "seed": 0,    "negative_prompt": "string",    "audio": true,    "output_format": "png"  },  "outputs": [    {      "id": "string",      "kind": "image",      "url": "http://example.com",      "url_expires_at": "2019-08-24T14:15:22Z",      "content_type": "string",      "width": 0,      "height": 0,      "duration_seconds": 0,      "has_audio": true,      "size_bytes": 0,      "expires_at": "2019-08-24T14:15:22Z"    }  ],  "error": {    "code": "content_rejected",    "message": "string",    "retryable": true  },  "price_estimate_micros": 0,  "charge_micros": 0,  "metadata": {    "property1": "string",    "property2": "string"  },  "created_at": "2019-08-24T14:15:22Z",  "started_at": "2019-08-24T14:15:22Z",  "completed_at": "2019-08-24T14:15:22Z"}