---
title: "Flows - Get flow definition"
method: GET
path: "/v1/ai/flows/{flow-id}"
tags: ["flows"]
---

# Flows - Get flow definition

`GET /v1/ai/flows/{flow-id}`

## Request

- Base URL: `https://api.magnific.com`
- URL: `https://api.magnific.com/v1/ai/flows/{flow-id}`
- Auth: API key in header `x-magnific-api-key`

Returns the full definition of a flow, including its dynamic inputs and cost.

**Inputs** define what values the caller must provide when running the flow:
- `creation` type: accepts an image/media URL, base64-encoded data, or an existing creation identifier
- `text` type: accepts a plain text string (prompt, label, etc.)
- `number` type: accepts a numeric value
- `select` type: accepts a value from predefined options

Use each input's `api_key` field (recommended, human-friendly node name) as the identifier when calling the run endpoint.
The UUID-based `id` field is still accepted for backward compatibility.
The `tool_metadata.total_cost` field indicates the credit cost per execution.

## Path parameters

- `flow-id` string, required

## Response `200`

OK - Flow definition with inputs and cost.

- InlineObject7
  - `data` FlowDetail, required: Full definition of a flow including dynamic inputs and cost.
    - `sqid` string, required: Short unique identifier.
    - `name` string, required: Human-readable name set by the creator.
    - `inputs` InputDefinition[], required: Dynamic input definitions. Each input corresponds to an entry node in the flow. The caller must provide values for all `required` inputs when calling the run endpoint.
      - `id` string, required: UUID-based identifier for this input. Format: `input-{nodeId}-{n}`. Still accepted as a key in the `inputs` object for backward compatibility; prefer `api_key`.
      - `api_key` string: Human-friendly identifier for this input, matching the node name. Recommended identifier to use as the key in the `inputs` object when running the flow.
      - `key` string, required: (Deprecated) Legacy human-readable key. Superseded by `api_key`; may be absent in newer responses. Prefer `api_key`.
      - `type` 'creation' | 'text' | 'number' | 'select', required: The type of input value expected: - `creation`: Image or media file (accepts URL, base64, or creation sqid) - `text`: Text prompt or string - `number`: Numeric value - `select`: Choice from predefined options
      - `label` string: Human-readable label for display.
      - `config` InputDefinitionConfig, nullable: Type-specific configuration. For `creation` type: contains `mediaType` (image, video, audio). For `select` type: may contain `options`. Null when not applicable (e.g. for `text` type).
        - `mediaType` 'image' | 'video' | 'audio': For `creation` type — the expected media kind.
      - `nodeId` string, uuid: UUID of the flow node this input feeds into.
      - `default` unknown
      - `required` boolean, required: Whether this input must be provided when running the flow.
      - `presentation` InputDefinitionPresentation, nullable: UI presentation hints for rendering the input. Present for `text` type inputs; null or absent for other types.
        - `mode` string: The UI control mode (e.g. `textarea`, `input`).
        - `type` string: The presentation type.
    - `tool_metadata` ToolMetadata: Metadata about the tool (UI hints, cost, categorization).
      - `icon` string: Icon identifier for UI rendering.
      - `description_key` string, nullable: Translation key for the tool description.
      - `translation_key` string, nullable: Translation key for the tool name.
      - `category` string: Category for grouping tools.
      - `sort_order` integer: Display order within category.
      - `total_cost` integer: Total credit cost per execution (sum of all workflow nodes).

## Other responses

- `401`: Unauthorized - The client must authenticate itself to get the requested response.
- `404`: Flow not found.
- `500`: Internal Server Error - The server has encountered a situation it doesn't know how to handle.
- `503`: Service Unavailable

---

[API](https://skmtc.dev/magnific/apis/magnific-api.md) · [All operations](https://skmtc.dev/magnific/apis/magnific-api/llms.txt) · [OpenAPI document](https://skmtc.dev/magnific/apis/magnific-api/revisions/60711fb082c7?raw)
