---
name: nok-foundations
description: "Connect to PhotonSphere, the credit rules and how to follow a video until it is ready. Load this before the others."
license: MIT
---

# PhotonSphere foundations

PhotonSphere makes short vertical videos (Shorts, Reels, TikTok) from an idea, a script, a link or a song, with AI narration, images or AI video, captions and music.

## Connect
- MCP server: `https://photonsphere.ai/api/mcp` (HTTP). Easiest: add it as a custom connector and sign in with the PhotonSphere account (OAuth, no key).
- Or send `Authorization: Bearer nok_…` with an API key from https://photonsphere.ai/developers.
- The account's plan must include API and MCP.

## First calls
1. `nok_balance` to see the credits.
2. `nok_get_account` for the plan and limits.
3. `nok_list_videos` to see existing videos.

## Rules that always apply
- Anything that generates (videos, scripts, ideas, media, voices) spends the user's PhotonSphere credits. Before spending, call `nok_estimate_video` (for videos) and tell the user the price. Only start after a clear yes.
- Never buy credits (`nok_buy_credits`) or post (`nok_publish`) without an explicit yes from the user for that exact action.
- Scripts must be original. Viral videos are inspiration only: never copy their words.
- If a tool answers that credits are missing or that the plan does not include something, tell the user and stop.

## Script format PhotonSphere expects
Each scene is two lines: a scene line with the visual description in English, then the narration.
```
[SCENE 1: close-up of an octopus heart beating, dark blue water]
An octopus has three hearts, and two of them stop when it swims.
[SCENE 2: octopus gliding over a coral reef, soft light]
That is why it prefers to crawl.
```

## Waiting for the video
After starting, call `nok_get_video` with the id every 20 to 30 seconds. When `ready` is true, give the user the `downloadPath` (it needs the same login or API key to download). If the status is `error`, report the progress message: failed generations are refunded automatically.
