# Magica ## Docs - [Get credit balance](https://magica.com/docs/api-reference/credits/balance.md): Return the authenticated user's current credit balance. - [List media generations](https://magica.com/docs/api-reference/media-library/list.md): Browse the authenticated user's media library — generated assets plus uploads. Cursor-paginated. - [Get media library stats](https://magica.com/docs/api-reference/media-library/stats.md): Per-type counts for the user's media library, plus a favorites count. - [Estimate node credits](https://magica.com/docs/api-reference/nodes/estimate-credits.md): Batch microcredit estimate for a list of nodes, against the inputs you'd actually run them with. - [Get model execution result](https://magica.com/docs/api-reference/nodes/get-model-run.md) - [List all models](https://magica.com/docs/api-reference/nodes/list-models.md): Flat list of every available Magica model with its nodeType, name, category, and sub-model IDs. - [Get model input schema](https://magica.com/docs/api-reference/nodes/model-schema.md): Return the input parameter schema for a single model — types, defaults, conditional fields, ranges. Use this before calling Run a model directly. - [Run a model directly](https://magica.com/docs/api-reference/nodes/run.md): Run a single Magica model without building a workflow. One-shot generation for image, video, audio, TTS, and LLM models. - [Search models](https://magica.com/docs/api-reference/nodes/search.md): Browse Magica's model catalog grouped by category. Find model IDs to use with Run a model directly or Get model input schema. - [Batch get runs](https://magica.com/docs/api-reference/runs/batch-get.md) - [Cancel a run](https://magica.com/docs/api-reference/runs/cancel.md) - [Clear workflow cache](https://magica.com/docs/api-reference/runs/clear-cache.md) - [Clear node cache](https://magica.com/docs/api-reference/runs/clear-node-cache.md) - [Get run details](https://magica.com/docs/api-reference/runs/get.md) - [Get all generated media for a workflow](https://magica.com/docs/api-reference/runs/get-all-media.md) - [Get cached node outputs](https://magica.com/docs/api-reference/runs/get-cache.md) - [Get node output](https://magica.com/docs/api-reference/runs/get-node-output.md) - [List runs](https://magica.com/docs/api-reference/runs/list.md) - [Start a workflow run](https://magica.com/docs/api-reference/runs/start.md) - [Get system workflow](https://magica.com/docs/api-reference/system-workflows/get.md) - [List system workflows](https://magica.com/docs/api-reference/system-workflows/list.md) - [Upload a file](https://magica.com/docs/api-reference/uploads/upload.md): Upload an image, video, audio, or raw file to permanent storage. Returns a stable URL plus parsed metadata. - [Add a node to a workflow](https://magica.com/docs/api-reference/workflows/add-node.md): Add a processing node to an existing workflow. Supports auto-positioning via column/row for parallel layouts, or exact position coordinates. Returns the new node ID and its input/output ports. - [Connect two nodes with an edge](https://magica.com/docs/api-reference/workflows/connect-nodes.md): Create a validated edge between two nodes. Checks type compatibility, prevents cycles, and enforces single-input rules. Handle formats: standard nodes use 'out:name'/'in:name', Request node uses bare field IDs, Response node input is 'result'. - [Create a workflow](https://magica.com/docs/api-reference/workflows/create.md): Create a new workflow with a full nodes + edges payload. - [Delete workflow](https://magica.com/docs/api-reference/workflows/delete.md) - [Delete a node from a workflow](https://magica.com/docs/api-reference/workflows/delete-node.md): Remove a node and all its connected edges. Cannot delete scaffold nodes (Request, Response). - [Remove an edge between nodes](https://magica.com/docs/api-reference/workflows/disconnect-nodes.md): Remove a connection (edge) between two nodes by its edge ID. - [Duplicate workflow](https://magica.com/docs/api-reference/workflows/duplicate.md) - [Estimate workflow credits](https://magica.com/docs/api-reference/workflows/estimate-credits.md): Total microcredit estimate for a workflow, plus a per-node breakdown. - [Get workflow](https://magica.com/docs/api-reference/workflows/get.md) - [List workflows](https://magica.com/docs/api-reference/workflows/list.md) - [Quick create workflow](https://magica.com/docs/api-reference/workflows/quick-create.md): User-friendly workflow creation. Just provide a name and optional request fields — Request and Response scaffold nodes are created automatically. - [Update workflow](https://magica.com/docs/api-reference/workflows/update.md) - [Update node inputs](https://magica.com/docs/api-reference/workflows/update-node.md): Update input values on an existing node without removing it or its edges. Only specified fields are changed; others keep their current values. - [Authentication](https://magica.com/docs/authentication.md): How to authenticate with the Magica Workflow API. - [Concepts](https://magica.com/docs/introduction/concepts.md): Workflows, runs, nodes, ports, and webhooks — the vocabulary you'll see throughout the Magica API. - [Overview](https://magica.com/docs/introduction/overview.md): REST API for managing AI workflows and execution runs on Magica. - [Quickstart](https://magica.com/docs/introduction/quickstart.md): Make your first Magica API call in under five minutes. - [Building Workflows](https://magica.com/docs/mcp-server/building-workflows.md): Use the MCP builder tools to create, edit, and rewire workflows from a conversation. - [Overview](https://magica.com/docs/mcp-server/overview.md): Connect AI assistants like Claude, Cursor, and Codex to Magica using the Model Context Protocol. - [Reference](https://magica.com/docs/mcp-server/reference.md): Authentication and client compatibility for the Magica MCP server. - [Runs & Execution](https://magica.com/docs/mcp-server/runs.md): How workflow runs work over MCP — request nodes, result shape, smart routing, and polling. - [Setup](https://magica.com/docs/mcp-server/setup.md): Connect Claude Code, Claude Desktop, or Cursor to the Magica MCP server. - [Available Tools](https://magica.com/docs/mcp-server/tools.md): All 23 MCP tools exposed by the Magica server, organized by category. - [Webhooks](https://magica.com/docs/webhooks.md): Receive real-time notifications when workflow runs complete, fail, or progress. ## OpenAPI Specs - [openapi](https://magica.com/docs/openapi.json)