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

# List all models

> Flat list of every available Magica model with its nodeType, name, category, and sub-model IDs.

Returns a single array containing every model the platform exposes — image, video, audio, LLM, and utility. Each entry surfaces the `nodeType` and any `subModels` for multi-mode models.

<Tip>
  Need the response **grouped by category** with role labels (GENERATE / EDIT /
  TRANSFORM)? Use [`GET /v1/models/search`](/api-reference/nodes/search)
  instead. This endpoint is intentionally flat — best when you just want to
  enumerate every model ID.
</Tip>

## Authorizations

<ParamField header="Authorization" type="string" required>
  Bearer API key. Format: `Bearer gx_your_api_key`.
</ParamField>

## Response

<ResponseField name="(array)" type="array">
  Array of model entries — one per registered node type.

  <Expandable title="Each entry">
    <ResponseField name="nodeType" type="string">
      Stable identifier used as `{nodeType}` in [`POST /v1/nodes/{nodeType}/run`](/api-reference/nodes/run), node-shaped estimate payloads, and single-mode model schema lookups (e.g. `nano_banana_pro`, `flux_2_max`, `kling_v3_pro`).
    </ResponseField>

    <ResponseField name="name" type="string">
      Human-readable display name.
    </ResponseField>

    <ResponseField name="description" type="string">
      Short description shown in pickers.
    </ResponseField>

    <ResponseField name="category" type="string">
      Toolbar category (`image`, `video`, `audio`, `llm`, `utility`).
    </ResponseField>

    <ResponseField name="icon" type="string">
      Icon identifier used by the UI.
    </ResponseField>

    <ResponseField name="accent" type="string">
      Accent color identifier.
    </ResponseField>

    <ResponseField name="subModels" type="array">
      Present only for multi-mode models. Each sub-model has its own `modelId` you can pass to [`GET /v1/models/{modelId}/schema`](/api-reference/nodes/model-schema), [`GET /v1/models/{modelId}/pricing`](/api-reference/nodes/model-pricing), and `subModelId` in [`POST /v1/nodes/{nodeType}/run`](/api-reference/nodes/run).

      <Expandable title="Sub-model fields">
        <ResponseField name="subModelId" type="string">Sub-model identifier (e.g. `nano-banana-pro-text`, `nano-banana-pro-edit`).</ResponseField>
        <ResponseField name="label" type="string">Human-readable mode label (e.g. "Text to Image", "Image to Image").</ResponseField>
        <ResponseField name="category" type="string">Specific category for this mode (e.g. `text-to-image`, `image-to-image`).</ResponseField>
      </Expandable>
    </ResponseField>
  </Expandable>
</ResponseField>

## Request

<Tabs>
  <Tab title="cURL">
    ```bash theme={null}
    curl https://api.magica.com/api/v1/models \
      -H "Authorization: Bearer $MAGICA_API_KEY"
    ```
  </Tab>

  <Tab title="Node.js">
    ```javascript theme={null}
    const res = await fetch("https://api.magica.com/api/v1/models", {
      headers: { Authorization: `Bearer ${process.env.MAGICA_API_KEY}` },
    });
    const models = await res.json();

    // Every nodeType you can use in /v1/nodes/{nodeType}/run
    const nodeTypes = models.map((m) => m.nodeType);

    // Every modelId you can pass to /v1/models/{modelId}/schema
    const modelIds = models.flatMap((m) =>
      m.subModels ? m.subModels.map((sm) => sm.subModelId) : [m.nodeType],
    );
    ```
  </Tab>

  <Tab title="Python">
    ```python theme={null}
    import os, requests

    res = requests.get(
        "https://api.magica.com/api/v1/models",
        headers={"Authorization": f"Bearer {os.environ['MAGICA_API_KEY']}"},
    )
    models = res.json()

    for m in models:
        if m.get("subModels"):
            for sm in m["subModels"]:
                print(f"{m['nodeType']:30}  {sm['subModelId']:30}  {sm['label']}")
        else:
            print(f"{m['nodeType']:30}  -")
    ```
  </Tab>
</Tabs>

## Response example

Truncated to two entries (the live response includes \~80 models):

```json theme={null}
[
  {
    "nodeType": "flux_2_max",
    "name": "FLUX 2 Max",
    "description": "State-of-the-art image generation with exceptional realism, precision, and consistency",
    "category": "image",
    "icon": "image",
    "accent": "blue",
    "subModels": [
      {
        "subModelId": "flux-2-max-text",
        "label": "Text to Image",
        "category": "text-to-image"
      },
      {
        "subModelId": "flux-2-max-edit",
        "label": "Image to Image",
        "category": "image-to-image"
      }
    ]
  },
  {
    "nodeType": "kling_v3_pro",
    "name": "Kling v3 Pro",
    "description": "Text-to-video and image-to-video.",
    "category": "video",
    "icon": "video",
    "accent": "pink"
  }
]
```

## What the IDs are for

| Field                    | Use it where                                                                                                                                                                                                                 |
| ------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `nodeType`               | Path param in [`POST /v1/nodes/{nodeType}/run`](/api-reference/nodes/run); also use as `nodeType` in [`POST /v1/nodes/estimate-credits`](/api-reference/nodes/estimate-credits)                                              |
| `subModels[].subModelId` | Path param in [`GET /v1/models/{modelId}/schema`](/api-reference/nodes/model-schema) and [`GET /v1/models/{modelId}/pricing`](/api-reference/nodes/model-pricing); also pass as `subModelId` when running a multi-mode model |

For single-mode models (no `subModels`), the schema endpoint accepts the `nodeType` directly.

## Errors

| Status | Reason                     |
| ------ | -------------------------- |
| `401`  | Missing or invalid API key |
| `500`  | Server error               |
