generate
Submit one billable image, video, or audio generation with an explicit idempotencyKey after checking get_model and estimate_cost. Pass optional waitMs (0–25000, e.g. 20000 for fast images) to wait in the same call and return the inline preview card + signed download URLs immediately when complete. Never submit a second key to resume or recover an existing job.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"modelId": "<modelId>",
"operation": "<operation>",
"input": "<input>",
"idempotencyKey": "<idempotencyKey>"
},
"name": "generate"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| input | Yes | Canonical model input object ({ prompt, resolution, duration, aspectRatio, firstFrame, references, ... }). | |
| waitMs | No | Optional synchronous wait window in ms (0–25000). Recommended 20000 for image models so fast results return in one call. | |
| billing | No | Billing mode ("managed" or "byok"). | |
| modelId | Yes | Exact model ID. | |
| routeId | No | Optional exact regional route ID. | |
| routing | No | Optional routing constraints ({ providerIds, endpointRegions, fallback, preference }). | |
| metadata | No | Optional private project/tags metadata ({ project?, tags? }). | |
| operation | Yes | Exact generation operation. | |
| webhookUrl | No | Optional public HTTPS webhook callback URL signed with Ed25519 (verifiable via /.well-known/webhook-jwks.json). | |
| maxCostMicros | No | Maximum managed spend ceiling in integer micro-USD. | |
| webhookEvents | No | Optional lifecycle events for webhookUrl (defaults to generation.completed, generation.failed, generation.cancelled). | |
| idempotencyKey | Yes | Stable caller-generated unique key (1–200 chars). Reuse only for the identical request. |