MCP tools
Every tool the MCP server gives an agent.
Every tool here has the same money, limits and rules as REST. See Connect through MCP for how to set it up.
list_models
Lists the models on sale: what each costs in credits (1 credit = $0.01), how long it usually takes and how often it succeeds.
Read-only.
| Field | Takes | What it is |
|---|---|---|
kind | image, video, text | Only this kind of model. |
get_model
A model's options and prices. Use it before generate: the options differ from model to model.
Read-only.
| Field | Takes | What it is |
|---|---|---|
model (required) | string | The model id from list_models. |
estimate_cost
Checks the options and says what a generation would cost. Nothing runs and nothing is charged.
Read-only.
| Field | Takes | What it is |
|---|---|---|
model (required) | string | The model id from list_models. |
prompt (required) | string | What to make. Refer to files by order: img1, img2, video1, audio1. |
images | array | Photos: file ids from upload_media or create_upload, or public https addresses. |
videos | array | Videos, the same way. |
audios | array | Audio, the same way. |
aspect_ratio | string | |
resolution | string | |
quality | string | |
duration | integer | Clip length in seconds. |
reference_mode | frames, ingredients, start | |
output_format | png, jpeg |
generate
Makes a photo, a video or text and spends credits. Photos and text are usually back in the answer; videos take minutes, so this returns an id to check with get_generation. Never call it again to check progress.
Changes something.
| Field | Takes | What it is |
|---|---|---|
model (required) | string | The model id from list_models. |
prompt (required) | string | What to make. Refer to files by order: img1, img2, video1, audio1. |
images | array | Photos: file ids from upload_media or create_upload, or public https addresses. |
videos | array | Videos, the same way. |
audios | array | Audio, the same way. |
aspect_ratio | string | |
resolution | string | |
quality | string | |
duration | integer | Clip length in seconds. |
reference_mode | frames, ingredients, start | |
output_format | png, jpeg | |
run_again | boolean | Make another one from exactly the same request. Without it, the same request within 10 minutes returns the same generation, unless that one failed or was deleted. |
get_generation
Status and result of a generation. Use it to check on one that was still working.
Read-only.
| Field | Takes | What it is |
|---|---|---|
id (required) | string | The id from generate. |
list_generations
Earlier generations, newest first, to find a result or use it as a file in a new one.
Read-only.
| Field | Takes | What it is |
|---|---|---|
status | queued, running, succeeded, failed, canceled | |
model | string | |
cursor | string | |
limit | integer |
cancel_generation
Cancels a generation still in the queue and gives the credits back. Once a model has it, it finishes and is billed.
Changes or removes something.
| Field | Takes | What it is |
|---|---|---|
id (required) | string |
delete_generation
Removes a finished generation's files and prompt now, without waiting for them to expire.
Changes or removes something.
| Field | Takes | What it is |
|---|---|---|
id (required) | string |
upload_media
Puts a photo, video or audio file into storage from a public https address, or from base64 up to 4 MB, and returns a file id for generate. Use only files you have the right to use.
Changes something.
| Field | Takes | What it is |
|---|---|---|
url | string | A public https address. |
data_base64 | string | The file itself, base64, up to 4 MB. |
create_upload
A link to PUT a local file to, for agents that can run commands. Returns a ready curl command; the file id works in generate once the file is there.
Changes something.
| Field | Takes | What it is |
|---|---|---|
content_type (required) | string | image/png, image/jpeg, image/webp, video/mp4, video/quicktime, audio/mpeg or audio/wav. |
bytes (required) | integer | The file's size. |
get_account
The balance, the limits of this connection and where to top up. Never top up on your own: send the person to the link.
Read-only.
No fields.