1. Get your API key
1
Sign in
Open app.magica.com and sign in.
2
Open API Keys
Go to Settings -> API Keys -> Manage.
3
Create a key
Click Create Key, label it, and copy the full
gx_... token
immediately. It is only shown once.2. Base URL
/v1.
3. List models
Use a read-only call to verify the key and discover model identifiers.- cURL
- Node.js
- Python
401 Unauthorized here means the key is missing, malformed, revoked, or expired.
4. Inspect model schema
Pick amodelId from subModels[].subModelId, or use nodeType for a single-mode model.
- cURL
- Node.js
- Python
5. Estimate credits
Estimate cost before a model or workflow execution.GET /v1/credits/balance before submitting expensive jobs.
6. Start a model run
runId. Poll GET /v1/nodes/runs/{runId} until the run reaches COMPLETED, FAILED, or CANCELED.
For workflow execution, use POST /v1/runs and poll GET /v1/runs/{runId}.
OpenAPI spec
The full OpenAPI 3.1 specification is at:Next steps
Model catalog
Browse available models and their identifiers.
Run workflows
Start workflow runs and poll results.
Concepts
Understand models, nodes, credits, system workflows, and run history.