Calculate credits
calculate_creditsEstimate credits from either a legacy creationParams payload or the same v3 payload used by render_video.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "calculate_credits"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pid | No | ||
| name | No | Project name, up to 200 characters. Set it here instead of calling `rename_project` afterward. Default: the start of the script or prompt. | |
| audio | No | Legacy alias of `music`. | |
| input | No | Generic content alias used by the public API. | |
| media | No | ||
| music | No | Recommended for background music: `music: { generateMusic: true }`. Revid generates an original instrumental track from this video's script, so it fits the topic and mood (20 credits per started minute of video). Add `music.generationMusicPrompt` to steer the mood, tempo and instruments. Use `music.trackName` only when the user asks for a specific library track: an agent cannot listen to the library, so a track picked by name rarely fits the video. With music on and no track, file or generated music, the neutral `Presentation` track plays. To make the music quieter or louder, set `music.volume` to `low`, `normal` or `high`, or to an exact level from 0 to 100. | |
| voice | No | ||
| avatar | No | ||
| prompt | No | Legacy alias of `source.prompt`. | |
| render | No | ||
| source | No | ||
| options | No | ||
| webhook | No | ||
| advanced | No | ||
| captions | No | ||
| metadata | No | ||
| workflow | No | ||
| inputText | No | Legacy alias of `source.text` or `source.url`. | |
| projectId | No | ||
| webhookUrl | No | ||
| aspectRatio | No | Output aspect ratio. | |
| inputMedias | No | Legacy alias of `media.provided`. | |
| characterIds | No | ||
| creationParams | No | Optional legacy payload for calculate_credits. | |
| customCreationParams | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | ||
| data | No | ||
| error | No | ||
| method | Yes | ||
| status | Yes | ||
| endpoint | Yes | ||
| retryAfterSeconds | No |