Initialization, tool discovery, catalog search, schemas and pricing work without
a key. Chat, model runs, job checks and the account tool need a valid API key.
1. Create an API key
Create a key on the API keys page and keep it in an environment variable. Never paste a real key into a shared config file, screenshot or prompt.macOS / Linux
Windows PowerShell
2. Add the server to your client
If a config file already lists other MCP servers, add only thesnapgen entry
and keep the rest.
- Codex
- Claude Code
- Cursor
- VS Code
- Other clients
Open Codex settings > MCP servers > Add server > Streamable HTTP, or add
this to Start a new Codex session to load it.
~/.codex/config.toml:~/.codex/config.toml
3. Verify without paying
Ask your agent:snapgen_account returns your
balance, and snapgen_search_models returns models. None of these steps
charges your balance.
Tools
The default address exposes eight compact tools. The agent searches first and reads a model’s schema only when it needs it, which keeps the tool list small.
When a job is still running,
snapgen_run_model returns its task_id. Keep
checking it with snapgen_check_job; submitting the same job again would run
and bill it twice. Pass an idempotency_key to make a retried submission safe.
Scoped tool modes
For stable workflows you can expose one typed tool per model instead:
Scoped modes also keep
snapgen_check_job and snapgen_account. Each typed
tool’s input schema is the model’s live request schema, plus wait_seconds
and idempotency_key for media models.
Billing
MCP does not change prices. Every model call is an ordinary API request made with your key: the same prices, balance, key limits and model allowlist apply, and failed generations are not charged. Searching, reading schemas and reading prices are free.Troubleshooting
- No SnapGen tools: check where the config was saved, then reload the MCP server or restart the client.
- “This tool needs an API key”: the client is not sending the
Authorizationheader. Make sureSNAPGEN_API_KEYis set in the environment that starts the client. - 401 or 403 from a paid tool: the key is invalid, revoked, or not allowed to use that model. Check it on the API keys page.
- Tool timeouts: use
snapgen_submit_jobfor video and poll withsnapgen_check_jobinstead of waiting in one call.