> ## Documentation Index
> Fetch the complete documentation index at: https://docs.eversince.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Calling tools

> The request and response of a tool call over REST, every error code, and how to make a retry safe.

## Request

`POST /api/v1/tools/{name}` with the tool's input as the JSON body. A read tool also answers `GET` with its input as query parameters, each converted to the type the schema declares; a read of many ids is a `POST`. Unknown fields and wrong types are rejected before anything runs.

Two headers apply to any tool: `Idempotency-Key`, equivalent to the `idempotency_key` field on a charged call, and `x-workspace-id`, which runs that one request in another workspace the key or connection is allowed to use.

## Response

```json theme={"dark"}
{
  "ok": true,
  "data": { … },
  "meta": { "request_id": "req_…", "cost": { … }, "cloud_processing": { … } },
  "media": [ … ]
}
```

`meta.cost` is present when credits were charged and `meta.cloud_processing` when minutes were, each with what was charged and what is left. `media` includes the pictures a tool returned inline (frames, a rendered still), so a REST caller sees what an MCP client sees.

## Response types

What `data` holds depends on the tool's kind, and every tool's description says what it returns.

* A result, from any write: what changed and the resulting state, with the ids of what was created. Reading the object again returns what the response already says. A timeline or canvas write includes the new revision, and a write whose work shows in a feed post includes `feed_url`.
* A job, from any slow operation: its id, place in the queue and estimate. `get_jobs` follows it. See [Jobs](https://docs.eversince.ai/concepts/jobs.md).
* A page, from any list: rows and `next_cursor`, which returns the next page when sent back with the same filters. A read that stopped early says so in `cut_short`.
* A batch, from a tool that takes many refs: one result per input. A failed input is reported alongside the others instead of failing the whole call.

## Errors

```json theme={"dark"}
{
  "ok": false,
  "error": { "code": "…", "message": "…", "retryable": false, "suggested_action": "…" }
}
```

`suggested_action` is the next call that works, not a restatement of the error. Work that used minutes before failing includes `cloud_processing` on the error.

| Code | Status | Retry | Meaning |
| - | - | - | - |
| `validation_error` | 400 | no | The message names the field. `GET /tools` has the exact input schema. |
| `not_media` | 400 | no | The ref is not audio or video. |
| `unauthorized` | 401 | no | The credential is missing or invalid. |
| `forbidden` | 403 | no | The credential has no access to this resource. A different id won't change that. |
| `refused` | 403 | no | Declined on purpose. The message says why. |
| `not_found` | 404 | no | Nothing has that id. Reading the object that gave the id again returns a current one. |
| `insufficient_credits` | 402 | no | Credits or cloud minutes ran out. `get_checkout_link` returns the link to buy more, and `get_balance` shows what is left. |
| `storage_full` | 507 | no | The owner's storage has no room for what this makes. `get_checkout_link` with `product: "storage"` returns a link to buy more, or `delete_items` frees room. |
| `conflict` | 409 | no | Something changed in the meantime. A fresh read shows the current state. |
| `revision_conflict` | 409 | no | The document changed since the revision given, or a user edited it since the last read. A fresh read returns the current revision. |
| `needs_cloud` | 409 | no | The call, made through the desktop app, set `run_on: "local"` and the work needed the cloud, so it did not run. The same call without it, or with `run_on: "cloud"`, runs in the cloud. |
| `rate_limited` | 429 | per `retryable` | A limit was reached, and the message names it. When retryable, the same call with the same key works after `Retry-After`. Otherwise the message says what changes it. |
| `payload_too_large` | 413 | no | The body is over 4.4 MB. Larger files go by upload or URL. |
| `unavailable` | 503 | yes | A provider or the service is briefly unavailable. The same call with the same key can be retried after `Retry-After`. |
| `internal_error` | 500 | once | An error in Eversince, not in the call. If it repeats, `submit_feedback` reports it. |

## Safe retries

A call that starts charged work (see [Costs](https://docs.eversince.ai/costs.md)) accepts an `idempotency_key`, made for that operation. A retry with the same key, in the field or in the `Idempotency-Key` header, returns the job already started instead of charging again. A new attempt uses a new key.

A write to a timeline or canvas accepts `if_revision` from the last read. See [Timelines and canvases](https://docs.eversince.ai/concepts/timelines-and-canvases.md).

## Timing

A call answers within about 30 seconds or returns a job. The API allows a call up to 300 seconds for the slowest tools. If a client cuts a call off earlier, the answer is lost but the work continues.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.