Authentication
Use a MagicPixels browser session token or an API key created from the studio.
Authorization: Bearer mp_live_xxx.yyy
Programs can upload assets, create generation jobs, poll status, and download protected results with the same bearer credential. A human user creates the account, subscription, and API key first.
Use a MagicPixels browser session token or an API key created from the studio.
Authorization: Bearer mp_live_xxx.yyy
All text prompts and generated voice text are capped at 500 characters.
{ "prompt": "500 characters max" }New accounts receive 1 free credit. Text-to-image and image-to-image cost 1 credit. Generated voice 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 "[email protected]"
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",
"voice_text": "Here is a quick launch update from the studio.",
"voice_id": "casual_male",
"prompt": "Natural talking-avatar movement"
}'curl https://api.magicpixels.ai/v1/account \ -H "Authorization: Bearer mp_live_xxx.yyy"
curl -X DELETE https://api.magicpixels.ai/v1/jobs/job_id \ -H "Authorization: Bearer mp_live_xxx.yyy"
Upload an image, audio, or video. Returns an asset id and owner-authorized content URL.
Create `text_to_image`, `image_to_image`, `audio`, or `image_to_video` jobs. Image-to-video accepts either `voice_text` for automatic voice generation or `audio_asset_id` for a prebuilt audio asset.
Poll until `status` is `completed` or `aborted`. Completed jobs include a result asset URL that requires the owner bearer token.
Delete a queued or finished job and any unshared media files. Credits charged for the job are not refunded.
Fetch premium status, billing tier, remaining credits, monthly credit grant, and any free signup credits still available.