Skip to main content

1. Get an API key

In the Melius app, go to Team settings → Integrations, create a key, and copy it — it’s shown once. See Authentication for details.

2. Make your first request

Paste your key into the snippet below and run it. It creates a project and canvas, adds an image node with your prompt, runs it, waits for the generation to finish, and prints the URL of the generated image.
No model is specified, so Melius picks one for you. To choose a specific model, add a modelConfig to the node from List generative models. The x-team-id header is optional — requests default to the team your key belongs to. Save the run key and request before submission. If starting the run times out or returns 5xx, resend only that run request with the same key, body and acting context. The server replays the accepted status and response without starting another run. For 409 with IDEMPOTENCY_REQUEST_IN_PROGRESS, wait at least the Retry-After value of one second before retrying. IDEMPOTENCY_KEY_REUSED means the request changed; use a fresh key only when you intend a new run. Rerunning the entire snippet creates a new project, canvas, node and run. Those setup mutations are outside idempotency coverage. See Retry a submission safely for key scope, conflicts and retention.

Next steps

Authentication

Keys, the x-team-id header, and how keys are scoped.

API overview

The base URL, how generations work, rate limits, and credits.
Last modified on November 10, 2026