MenuQuickstart

Quickstart

Your first photo in five minutes

Get a key, check your balance, start a photo and collect the result. Every example works as-is once MAKECORN_API_KEY is set in your environment.

Five steps#

  1. 1

    Choose a paid plan

    The API is included with every paid plan and uses the same credits as the website. See plans at https://www.makecorn.com/pricing.

  2. 2

    Create an API key

    Open https://www.makecorn.com/dashboard/settings/api-keys, name the key after the app that will use it and copy it straight away. It starts with mc_live_ and is only shown once.

  3. 3

    Check your balance

    Call GET /account. If canGenerate is true and you have credits, you are ready.

  4. 4

    Start a photo or video

    POST /generations/image or /generations/video. You get an id and a statusUrl back right away.

  5. 5

    Wait for the result

    GET the statusUrl until status is "succeeded" or "failed". Photos usually take 10 to 30 seconds, videos from under a minute to five minutes.

Your first request#

Check your plan and balance. It's free and proves your key works. If canGenerate is false, choose a paid plan first.

Pick a language on the right. Your choice is remembered on every code sample in the docs.

curl "https://www.makecorn.com/api/v1/account" \
  -H "Authorization: Bearer $MAKECORN_API_KEY"
Response
{
  "plan": "pro",
  "canGenerate": true,
  "credits": 1240,
  "links": {
    "pricing": "https://www.makecorn.com/pricing",
    "topUp": "https://www.makecorn.com/dashboard/credits/buy"
  }
}

Full example: create a photo and wait for it#

This starts one photo, checks its status every three seconds and prints the finished link. Swap the model and prompt for your own. See Create photos for every option.

# 1. Start a photo and keep its statusUrl
STATUS_URL=$(curl -s -X POST "https://www.makecorn.com/api/v1/generations/image" \
  -H "Authorization: Bearer $MAKECORN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model": "wan-26-nsfw", "prompt": "A fictional adult woman in a red dress on a rooftop at sunset"}' \
  | jq -r '.generations[0].statusUrl')

# 2. Check it every 3 seconds until it is finished
while true; do
  RESULT=$(curl -s "$STATUS_URL" \
    -H "Authorization: Bearer $MAKECORN_API_KEY")
  STATUS=$(echo "$RESULT" | jq -r '.status')
  if [ "$STATUS" = "succeeded" ] || [ "$STATUS" = "failed" ]; then
    echo "$RESULT"
    break
  fi
  sleep 3
done

Waiting for results#

  • Creating returns 202 Accepted with an id and statusUrl. Nothing is finished yet.
  • status is one of "queued", "processing", "succeeded" or "failed".
  • Photos are usually ready in 10 to 30 seconds. Check them every 2 to 5 seconds.
  • Short videos are often ready in under a minute, longer ones can take up to five minutes. Check them every 10 to 15 seconds.
  • On "succeeded", read urls (photos) or url (video). If withheld is true, the result broke our content rules and is not delivered.
  • On "failed", creditsCharged is 0 and the credits are already back in your balance. Show error to your user or try again.
  • Status checks count toward the 120 requests per minute limit, so don't poll faster than you need.
Failed video
{
  "id": "3f0c8f7e-2b1a-4c55-9d7e-6a1b2c3d4e5f",
  "kind": "video",
  "model": "wan3-spicy",
  "status": "failed",
  "prompt": "She turns toward the camera and smiles as the wind moves her hair",
  "url": null,
  "withheld": false,
  "error": "This video couldn't be created. Its credits were returned to your balance.",
  "creditsCharged": 0,
  "createdAt": "2026-09-25T10:00:00.000Z",
  "statusUrl": "https://www.makecorn.com/api/v1/generations/video/3f0c8f7e-2b1a-4c55-9d7e-6a1b2c3d4e5f"
}

Building with an AI agent? Give it the whole API in one paste.