# Overview (https://docs.fuser.studio/docs/api)

The Fuser API is a set of JSON calls at `https://api.fuser.studio/v1`. Use it
to generate media from your own app, run a canvas as a template, or automate
batches. It is the same set of tools AI agents get over [MCP](https://docs.fuser.studio/docs/mcp.md), so
anything an agent can do, your code can too.

## A first call [#a-first-call]

```bash
curl https://api.fuser.studio/v1/account_get \
  -H "x-api-key: $FUSER_API_KEY"
```

```json
{
  "name": "Ada",
  "personalCredits": 12598.3,
  "workspaces": [
    {
      "workspaceId": "4f0c…",
      "name": "Fuser Labs",
      "role": "owner",
      "credits": 9894,
      "canSpend": true,
      "monthlySpendLimit": null
    }
  ]
}
```

## Concepts [#concepts]

|              |                                                                                                                                              |
| ------------ | -------------------------------------------------------------------------------------------------------------------------------------------- |
| **Canvas**   | A Fuser project: nodes, the connections between them, and their results. Everything the API makes lands on one, so you can open it in Fuser. |
| **Node**     | One step: a text prompt, an image, an image model, a tool. Each has inputs (with ids like `prompt`) and outputs.                             |
| **Edit**     | A batch of changes to a canvas, applied all at once or not at all.                                                                           |
| **Run**      | Running some or all of a canvas. It's priced first and refused if it costs more than you allow.                                              |
| **Revision** | A canvas's version number. Pass it with an edit to make sure nobody changed the canvas since you read it.                                    |

## How a job goes [#how-a-job-goes]

    ### Build the canvas [#build-the-canvas]

    [`canvas_edit`](https://docs.fuser.studio/docs/api/canvas-edit.md) adds nodes and connections in one
    change, on a new canvas or an existing one.
    [`catalog_search`](https://docs.fuser.studio/docs/api/catalog-search.md) finds the right node and
    its input ids.

    ### Price it [#price-it]

    [`run_start`](https://docs.fuser.studio/docs/api/run-start.md) with `dryRun: true` returns the cost in credits
    without spending anything.

    ### Run it [#run-it]

    `run_start` with `maxCredits` starts it, and is refused if it would cost more.

    ### Collect the results [#collect-the-results]

    [`run_get`](https://docs.fuser.studio/docs/api/run-get.md) waits up to 10 seconds and returns links
    to every result. Call it again until the run is `completed`.

![A canvas made through the API: twelve sale banners, one per product](/mcp-batch-banners.jpg)

## What's Next? [#whats-next]

  - [Generate an image](https://docs.fuser.studio/docs/api/guides/generate-an-image.md): The whole flow in four requests.

  - [Authentication](https://docs.fuser.studio/docs/api/authentication.md): API keys and what they can do.

  - [Errors and retries](https://docs.fuser.studio/docs/api/errors.md): Error responses, limits and safe retries.

  - [Use it from an agent](https://docs.fuser.studio/docs/mcp.md): The same tools in Claude, ChatGPT, Cursor or Codex.