API docs › Recipes

3D animation and motion graphics

The AI animates in code (2D motion graphics or real 3D scenes), reviews its own frames, narrates and adds music.

  1. Start it (mode "3d" with a look, or "code" for 2D motion graphics). The video appears in your projects when ready:

    curl -X POST https://photonsphere.ai/api/motion -H "Authorization: Bearer nok_YOUR_KEY" -H "Content-Type: application/json" -d '{"mode":"3d","look3d":"simulation","brief":"How a mechanical watch works: gears, spring, escapement","seconds":20,"voice":"openai:nova","language":"English"}'
    # → {"projectId":"PROJECT_ID","credits":…}
  2. Poll the project and download it as usual:

    curl https://photonsphere.ai/api/projects/PROJECT_ID -H "Authorization: Bearer nok_YOUR_KEY"
    curl -o video.mp4 https://photonsphere.ai/api/projects/PROJECT_ID/file/video -H "Authorization: Bearer nok_YOUR_KEY"

All calls need Authorization: Bearer nok_… (see Authentication). Prices are the same as in the app.