API

Create videos from your own system. Every request carries your key in the Authorization header.

Your keys

No keys yet.

How to use

Create a video
curl -X POST https://YOUR-SITE/api/projects \
  -H "Authorization: Bearer nok_YOUR_KEY" -H "Content-Type: application/json" \
  -d '{"name":"My video","script":"[SCENE 1: …]\nNarration…","settings":{"coverLine1":"TOO SMALL","coverLine2":"FOR THIS"}}'
# → {"id":"PROJECT_ID"}
Start generating (charges credits)
curl -X POST https://YOUR-SITE/api/projects/PROJECT_ID/run \
  -H "Authorization: Bearer nok_YOUR_KEY"
Check progress and get the file
curl https://YOUR-SITE/api/projects/PROJECT_ID -H "Authorization: Bearer nok_YOUR_KEY"
# status: generating | ready | error
curl -o video.mp4 https://YOUR-SITE/api/projects/PROJECT_ID/file/video -H "Authorization: Bearer nok_YOUR_KEY"
List your videos
curl https://YOUR-SITE/api/projects -H "Authorization: Bearer nok_YOUR_KEY"
Errors return a JSON body with an "error" message. 402 = not enough credits, 403 = not in your plan, 429 = too many at once.

Connect an AI app (no key)

In Claude, ChatGPT, Cursor or any MCP app, add a connector with this address. The app opens the PhotonSphere login, you approve it, and that is it: no key to copy.

  1. Copy the address above.
  2. In your AI app, add a custom connector (in Claude: Settings, Connectors, Add custom connector) and paste it.
  3. Sign in to PhotonSphere in the window that opens and click Authorize.

Connected apps

Use PhotonSphere from an AI assistant (MCP)

MCP lets assistants such as Claude list your videos, check prices, create a video and follow it. Add this server in the assistant's MCP settings, with one of your keys. Creating with "start" charges credits, exactly like the app.

{
  "mcpServers": {
    "nok": {
      "type": "http",
      "url": "https://YOUR-SITE/api/mcp",
      "headers": { "Authorization": "Bearer nok_YOUR_KEY" }
    }
  }
}
nok_list_videos · nok_get_video · nok_estimate_video · nok_create_video · nok_start_video · nok_balance · nok_results

Command line (CLI)

A small program for the terminal (needs Node 18 or newer). Download it and run the commands below.

node nok.mjs login https://YOUR-SITE nok_YOUR_KEY
node nok.mjs balance
node nok.mjs estimate script.txt
node nok.mjs create script.txt --name "My video" --cover1 "TOO SMALL" --cover2 "FOR THIS" --run --wait
node nok.mjs download PROJECT_ID video.mp4

New: the npm package (nok-cli), with every MCP tool through nok call →

Skill for AI agents

A ready SKILL.md that teaches an agent (Claude Code and others) to use PhotonSphere through MCP, the command line or the API. It has no key inside: the agent reads it from NOK_API_KEY.

Catalog of ready skills, one per job (idea, script, article, product, viral, a week of posts) →