Generate image or video
generateStarts a job and reserves its credits; they are refunded in full if the job fails or is blocked. Call get_price first. prompt_mode "auto" (default) lets Tevyon write the prompt for the model from the user's idea; "exact" sends your own finished prompt unchanged (up to the model's maxLength in list_models). Pass wait_seconds to wait for the result in this call, else poll get_job. idempotency_key is required: a new unique string (e.g. a UUID) per intended job, the same one only to retry it, so that a retried call never starts or charges a job twice. Pass max_credits (the credits from get_price) so the job only starts at the price you showed the user.
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": {
"job_type": "<job_type>",
"params": "<params>",
"idempotency_key": "<idempotency_key>"
},
"name": "generate"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| params | Yes | Parameters by the model's schema from list_models; prompt is required. | |
| based_on | No | Id of a draft job (or the first format of a set) whose written prompt this job reuses, so the final keeps the draft's look. | |
| job_type | Yes | From list_models. | |
| consent_id | No | Jobs with real people (Face Swap, Character Swap, talking photo, Lip-Sync with an own photo): the consent_id from request_consent, after the user confirmed in Tevyon. | |
| max_credits | No | The credits from get_price. The job does not start if it now costs more. | |
| prompt_mode | No | auto | |
| webhook_url | No | An https address that gets the finished job as a POST (job.finished, signed with webhook_secret from get_account), instead of polling get_job. | |
| wait_seconds | No | Seconds to wait for the job to finish (0 to 50). | |
| idempotency_key | Yes | A new unique string per intended job, e.g. a UUID. Reuse it only to retry that job. |