Quote a batch
Price a whole batch of generations at once. No credits are charged and nothing runs yet. Sending the same batch again returns the same quote; changing or reordering items creates a new one.
Price a whole batch of generations at once. No credits are charged and nothing runs yet. Sending the same batch again returns the same quote; changing or reordering items creates a new one.
Authorization
bearerAuth API key authentication. Use your API key as the bearer token: Authorization: Bearer roasos_sk_...
In: header
Header Parameters
A unique string that makes retries safe. Any value 16-255 characters; reuse it only when retrying the exact same request.
^[A-Za-z0-9._:-]+$16 <= length <= 255Optional label to group this request under one of your projects. Appears in your usage records.
^[A-Za-z0-9][A-Za-z0-9._:-]{0,63}$1 <= length <= 64Optional label to attribute this request to a cost center. Appears in your usage records.
^[A-Za-z0-9][A-Za-z0-9._:-]{0,63}$1 <= length <= 64Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/v1/generation-batches/quotes" \ -H "Idempotency-Key: stringstringstri" \ -H "Content-Type: application/json" \ -d '{ "items": [ { "item_id": "hero-image", "request": { "type": "image", "prompt": "Studio product photograph of a cobalt hydration bottle", "model": "nano-banana-pro", "options": { "aspect_ratio": "1:1", "resolution": "1K", "num_outputs": 1 } } }, { "item_id": "hero-video", "request": { "type": "video", "prompt": "Slow push-in on a skincare bottle in soft morning light", "model": "kling-4", "options": { "aspect_ratio": "9:16", "resolution": "720p", "duration": 5 } } } ] }'{ "data": { "kind": "batch_quote", "batch_quote_id": "8ef6e596-5965-4f39-82f7-be6c2cb930ec", "items": [ { "item_id": "string", "reserved_credits": 1, "confirmation": { "generation_type": "image", "model": "string", "mode": "string", "resolution": "string", "output_count": 1, "duration_seconds": 1, "generate_audio": true, "reference_count": 0, "text_length": 0 } } ], "total_reserved_credits": 1, "pricing_version": "string", "expires_at": "2019-08-24T14:15:22Z", "authorization": { "status": "auto_approved" } }}