Authentication
Use a Supabase user JWT in the browser or an API key created from the MagicPixels studio.
Authorization: Bearer mp_live_xxx.yyy
Programs can upload assets, create generation jobs, poll status, and download results. A human user creates the account, subscription, and API key first.
Use a Supabase user JWT in the browser or an API key created from the MagicPixels studio.
Authorization: Bearer mp_live_xxx.yyy
All text prompts and generated voice text are capped at 500 characters.
{ "prompt": "500 characters max" }Text-to-image and image-to-image cost 1 credit. Audio costs 1 credit per 10 seconds. Video costs 22 credits per second.
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"
}'Upload an image, audio, or video. Returns an asset id and URL.
Create `text_to_image`, `image_to_image`, `audio`, or `image_to_video` jobs.
Poll until `status` is `completed` or `aborted`. Completed jobs include a result asset URL.