# Studio

URL: https://docs.hanzo.ai/docs/openapi/studio

> Hanzo Studio's workflow backend: every creation — an image, a poster, a document, a deck, a type system, a 3D model, an ad, a film, a voice, a song — is a run of a graph of steps that the person who started it owns.

Also for this capability: **API** · [CLI](https://docs.hanzo.ai/docs/cli/studio) · [MCP](https://docs.hanzo.ai/docs/mcp-tools/studio) · [SDKs](https://docs.hanzo.ai/docs/sdks)

Hanzo Studio's workflow backend: every creation — an image, a poster, a document, a deck, a type system, a 3D model, an ad, a film, a voice, a song — is a run of a graph of steps that the person who started it owns.

> [All API references →](https://docs.hanzo.ai/docs/openapi) · [Get started →](https://docs.hanzo.ai/docs/guides)

|                |                                        |
| -------------- | -------------------------------------- |
| **Base URL**   | `https://api.hanzo.ai`                 |
| **Operations** | 34                                     |
| **Auth**       | `Authorization: Bearer $HANZO_API_KEY` |

## Specification

Specification pending — no HIP in [hanzoai/hips](https://github.com/hanzoai/hips) declares `capability: studio` yet. What this capability serves is below, from the API document; what it is — the store it owns, how it meters, what it publishes — is written as a HIP under HIP-0139.

## Four surfaces

| Surface  | Reaches this capability as                     | Coverage                                                                   |
| -------- | ---------------------------------------------- | -------------------------------------------------------------------------- |
| **REST** | `studio` at its own prefix                     | 34 operations                                                              |
| **CLI**  | `hanzo studio …`                               | 34 of 34                                                                   |
| **SDK**  | `StudioApi` in every published client          | 34 methods                                                                 |
| **MCP**  | tool `studio` on `https://api.hanzo.ai/v1/mcp` | 32 operations, 1 under the document's own id — ask `describe` for the rest |

## Quickstart

```bash
export HANZO_API_KEY=sk-...   # console.hanzo.ai → API keys
```

Then the first call — a read that needs nothing but the key. `GET /v1/studio/gpus`, operation `get_studio_gpus`:

**CLI**

```bash
hanzo studio gpus
```

**SDK**

**.ts**

```ts
import { Configuration, StudioApi } from 'hanzoai';

const api = new StudioApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.getStudioGpus();
```

**.py**

```python
from hanzoai.cloud import ApiClient, Configuration
from hanzoai.cloud.api import StudioApi

client = ApiClient(Configuration(access_token=os.environ["HANZO_API_KEY"]))
result = StudioApi(client).get_studio_gpus()
```

**.go**

```go
cfg := hanzoai.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := hanzoai.NewAPIClient(cfg)

resp, _, err := client.StudioAPI.GetStudioGpus(context.Background()).Execute()
if err != nil {
	return err
}
```

**.rs**

```rust
use hanzo_client::apis::{configuration::Configuration, studio_api};

let mut cfg = Configuration::new();
cfg.bearer_access_token = std::env::var("HANZO_API_KEY").ok();

let result = studio_api::get_studio_gpus(&cfg, Default::default()).await?;
```

**.java**

```java
import ai.hanzo.cloud.ApiClient;
import ai.hanzo.cloud.api.StudioApi;

ApiClient client = new ApiClient();
client.setBearerToken(System.getenv("HANZO_API_KEY"));

var result = new StudioApi(client).getStudioGpus();
```

**HTTP**

```bash
curl https://api.hanzo.ai/v1/studio/gpus \
  -H "Authorization: Bearer $HANZO_API_KEY"
```

**MCP**

Tool `studio`, op `get_studio_gpus` — POST the JSON-RPC envelope to `https://api.hanzo.ai/v1/mcp`.

```bash
curl -X POST https://api.hanzo.ai/v1/mcp \
  -H "Authorization: Bearer $HANZO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
       "jsonrpc": "2.0",
       "id": 1,
       "method": "tools/call",
       "params": {
         "name": "studio",
         "arguments": {
           "op": "get_studio_gpus",
           "input": {}
         }
       }
     }'
```

Answers `200` with `object` — ok.

## Endpoints

| Endpoint                                                                                                        | What it does                                                                                                                                                                                      |
| --------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [`GET /v1/studio/brands/{id}`](https://docs.hanzo.ai/docs/openapi/studio/get-studio-brands-by-id)               | Reads one brand you may read.                                                                                                                                                                     |
| [`PATCH /v1/studio/brands/{id}`](https://docs.hanzo.ai/docs/openapi/studio/patch-studio-brands-by-id)           | Changes one of your brands; absent fields stay as they are.                                                                                                                                       |
| [`DELETE /v1/studio/brands/{id}`](https://docs.hanzo.ai/docs/openapi/studio/delete-studio-brands-by-id)         | Deletes one of your brands.                                                                                                                                                                       |
| [`GET /v1/studio/brands`](https://docs.hanzo.ai/docs/openapi/studio/get-studio-brands)                          | Lists the brands you may read — palettes and type systems as design tokens.                                                                                                                       |
| [`POST /v1/studio/brands`](https://docs.hanzo.ai/docs/openapi/studio/post-studio-brands)                        | Saves a brand: its tokens in the W3C design-token format (color, font, type, space, radius groups) and up to 16 logo items.                                                                       |
| [`POST /v1/studio/chat`](https://docs.hanzo.ai/docs/openapi/studio/post-studio-chat)                            | One chat turn that plans and launches runs, streamed                                                                                                                                              |
| [`GET /v1/studio/documents/{id}`](https://docs.hanzo.ai/docs/openapi/studio/get-studio-documents-by-id)         | Reads one document you may read.                                                                                                                                                                  |
| [`PATCH /v1/studio/documents/{id}`](https://docs.hanzo.ai/docs/openapi/studio/patch-studio-documents-by-id)     | Changes one of your documents; absent fields stay as they are.                                                                                                                                    |
| [`DELETE /v1/studio/documents/{id}`](https://docs.hanzo.ai/docs/openapi/studio/delete-studio-documents-by-id)   | Deletes one of your documents.                                                                                                                                                                    |
| [`GET /v1/studio/documents`](https://docs.hanzo.ai/docs/openapi/studio/get-studio-documents)                    | Lists the documents and decks you may read, most recently changed first.                                                                                                                          |
| [`POST /v1/studio/documents`](https://docs.hanzo.ai/docs/openapi/studio/post-studio-documents)                  | Writes a document (kind doc, its IR blocks) or a deck (kind deck, its slides).                                                                                                                    |
| [`POST /v1/studio/estimate`](https://docs.hanzo.ai/docs/openapi/studio/post-studio-estimate)                    | Prices a run without starting it: the estimate POST /v1/studio/runs would reserve, step by step.                                                                                                  |
| [`GET /v1/studio/flows/{id}`](https://docs.hanzo.ai/docs/openapi/studio/get-studio-flows-by-id)                 | Reads one flow you may read.                                                                                                                                                                      |
| [`PATCH /v1/studio/flows/{id}`](https://docs.hanzo.ai/docs/openapi/studio/patch-studio-flows-by-id)             | Changes one of your flows; absent fields stay as they are.                                                                                                                                        |
| [`DELETE /v1/studio/flows/{id}`](https://docs.hanzo.ai/docs/openapi/studio/delete-studio-flows-by-id)           | Deletes one of your flows.                                                                                                                                                                        |
| [`GET /v1/studio/flows`](https://docs.hanzo.ai/docs/openapi/studio/get-studio-flows)                            | Lists the flows you may read, most recently changed first.                                                                                                                                        |
| [`POST /v1/studio/flows`](https://docs.hanzo.ai/docs/openapi/studio/post-studio-flows)                          | Saves a graph as a flow of yours.                                                                                                                                                                 |
| [`GET /v1/studio/gpus`](https://docs.hanzo.ai/docs/openapi/studio/get-studio-gpus)                              | Lists the GPUs your org has linked with `hanzo link` that can take a studio.render step, each with whether it is free now.                                                                        |
| [`POST /v1/studio/runs/{id}/cancel`](https://docs.hanzo.ai/docs/openapi/studio/post-studio-runs-by-id-cancel)   | Cancels one of your runs: a step in flight is told to stop, nothing new starts, and the reservation settles to what finished steps cost.                                                          |
| [`GET /v1/studio/runs/{id}/events`](https://docs.hanzo.ai/docs/openapi/studio/get-studio-runs-by-id-events)     | Stream a run's progress as Server-Sent Events                                                                                                                                                     |
| [`POST /v1/studio/runs/{id}/retry`](https://docs.hanzo.ai/docs/openapi/studio/post-studio-runs-by-id-retry)     | Resumes one of your runs that failed or was cancelled: the steps that did not succeed run again in the same run, and the steps that did keep their outputs and are neither run nor charged again. |
| [`GET /v1/studio/runs/{id}/versions`](https://docs.hanzo.ai/docs/openapi/studio/get-studio-runs-by-id-versions) | Lists every version of a creation you may read — the runs in this run's lineage — oldest (version 1) first.                                                                                       |
| [`GET /v1/studio/runs/{id}`](https://docs.hanzo.ai/docs/openapi/studio/get-studio-runs-by-id)                   | Reads one run: its graph, its input, every step's state, the assets it made and what it cost.                                                                                                     |
| [`PATCH /v1/studio/runs/{id}`](https://docs.hanzo.ai/docs/openapi/studio/patch-studio-runs-by-id)               | Renames or shares one of your runs.                                                                                                                                                               |
| [`GET /v1/studio/runs`](https://docs.hanzo.ai/docs/openapi/studio/get-studio-runs)                              | Lists the runs you may read — your own and those your org shares — newest first.                                                                                                                  |
| [`POST /v1/studio/runs`](https://docs.hanzo.ai/docs/openapi/studio/post-studio-runs)                            | Starts a run: name exactly one of template, flow or graph, with the input its inputs schema asks for.                                                                                             |
| [`GET /v1/studio/templates/{id}`](https://docs.hanzo.ai/docs/openapi/studio/get-studio-templates-by-id)         | Reads one template: a catalog slug or one of your org's templates you may read.                                                                                                                   |
| [`PATCH /v1/studio/templates/{id}`](https://docs.hanzo.ai/docs/openapi/studio/patch-studio-templates-by-id)     | Changes one of your templates; absent fields stay as they are.                                                                                                                                    |
| [`DELETE /v1/studio/templates/{id}`](https://docs.hanzo.ai/docs/openapi/studio/delete-studio-templates-by-id)   | Deletes one of your templates.                                                                                                                                                                    |
| [`GET /v1/studio/templates`](https://docs.hanzo.ai/docs/openapi/studio/get-studio-templates)                    | Lists templates: the public catalog (org empty) first, then your org's own that you may read.                                                                                                     |
| [`POST /v1/studio/templates`](https://docs.hanzo.ai/docs/openapi/studio/post-studio-templates)                  | Saves a template to your org: a graph and the inputs schema its runs are started with.                                                                                                            |
| [`GET /v1/studio/threads/{id}`](https://docs.hanzo.ai/docs/openapi/studio/get-studio-threads-by-id)             | Reads one of your threads and its messages, oldest first.                                                                                                                                         |
| [`DELETE /v1/studio/threads/{id}`](https://docs.hanzo.ai/docs/openapi/studio/delete-studio-threads-by-id)       | Deletes one of your threads.                                                                                                                                                                      |
| [`GET /v1/studio/threads`](https://docs.hanzo.ai/docs/openapi/studio/get-studio-threads)                        | Lists your chat threads, most recent first.                                                                                                                                                       |

---

[All Hanzo APIs](https://docs.hanzo.ai/docs/openapi) · [Interactive reference](https://docs.hanzo.ai/docs/openapi/reference)
