Lesson 2 of 3
Make your first request
Estimate and generate an image from code.
Send your key as a Bearer token:
Authorization: Bearer YOUR_API_KEY
Estimate first
Call POST /ai-images/generations/estimate-credits/ with the same body you’ll send to generate. It returns the credit cost without generating anything.
Generate
Call POST /ai-images/generations/ with up to 10 scenes. The Settings → API page has a ready-made example in JavaScript and Python, with the base URL filled in.
Scripts and voiceovers
POST /writing/writes scripts.POST /audio/tts/turns text into a voiceover.