MagicPixels API

Programs can upload assets, create generation jobs, poll status, and download results. A human user creates the account, subscription, and API key first.

Authentication

Use a Supabase user JWT in the browser or an API key created from the MagicPixels studio.

Authorization: Bearer mp_live_xxx.yyy

Prompt limit

All text prompts and generated voice text are capped at 500 characters.

{ "prompt": "500 characters max" }

Pricing

Text-to-image and image-to-image cost 1 credit. Audio costs 1 credit per 10 seconds. Video costs 22 credits per second.

Core requests

curl -X POST https://api.magicpixels.ai/v1/assets \
  -H "Authorization: Bearer mp_live_xxx.yyy" \
  -F "kind=image" \
  -F "file=@source.png"
curl -X POST https://api.magicpixels.ai/v1/jobs \
  -H "Authorization: Bearer mp_live_xxx.yyy" \
  -H "Content-Type: application/json" \
  -d '{
    "mode": "text_to_image",
    "prompt": "Editorial product photo of a ceramic cup on brushed steel"
  }'
curl -X POST https://api.magicpixels.ai/v1/jobs \
  -H "Authorization: Bearer mp_live_xxx.yyy" \
  -H "Content-Type: application/json" \
  -d '{
    "mode": "image_to_video",
    "input_image_asset_id": "image_asset_id",
    "audio_asset_id": "audio_asset_id",
    "prompt": "Natural talking-avatar movement"
  }'

POST /v1/assets

Upload an image, audio, or video. Returns an asset id and URL.

POST /v1/jobs

Create `text_to_image`, `image_to_image`, `audio`, or `image_to_video` jobs.

GET /v1/jobs/:id

Poll until `status` is `completed` or `aborted`. Completed jobs include a result asset URL.