BASE to the API origin. Production is https://magica-backend-oda9.onrender.com. Keys are created while you are signed in. Public calls use the key, not the session.
1
Create an API key
In the product, open API / MCP and create a key. Or, with a signed-in session:Store the
key field. Later list calls only return prefix.2
Send a message
You do not create a chat first. Omit Response
chatId and the API creates one. Attach a file with multipart, or pass image_urls if you already have a URL.202:3
Poll the run
status is COMPLETE, FAILED, or CANCELLED. Read assistant.contentBlocks for the reply and errorMessage if it failed.Send into an existing chat
POST /completions with chatId, text, and file in one multipart request.Call a Magica tool
Crop, generate, or merge without waiting on the agent loop.