Skip to Content
NoCam API

For AI agents

Everything an AI agent needs to use this API without guessing. Hand this page to yours.

A purple character gives a high five to a small white robot on a rooftop at night. Made with this API.

This page is for the model doing the work. If you're a person, paste the prompt below into your agent, and it will take it from there.

Hand it to your agent

Use the NoCam API to make photos, videos and text.
Read https://docs.nocamclub.com/llms.txt first, and follow the rules on https://docs.nocamclub.com/for-ai-agents.md
My key is in the NOCAM_API_KEY environment variable. Never print it.
Before spending more than 100 credits in one go, tell me the price and wait for my yes.

What to read

WhatAddress
The map: every page in one line/llms.txt
Everything in one file/llms-full.txt
Any page as MarkdownAdd .md: /api/generations.md
The API as OpenAPI 3.1/openapi.json, also at https://api.nocamclub.com/v1/openapi.json
What's on sale right now, with options and pricesGET https://api.nocamclub.com/v1/models
A skill file for Claude Code and similar agents/skills/nocam/SKILL.md

The rules

  1. Don't guess a model's options. They differ from model to model, and they change with what's on sale. Read GET /v1/models/{id}: input_schema is the truth, and prices lists what can be bought right now. An unknown field is refused, not ignored.
  2. Check before you spend. POST /v1/estimate takes the same body as POST /v1/generations, checks everything and gives the price. Nothing runs and nothing is charged.
  3. Always send an Idempotency-Key. Use a new one for each thing you want made, and the same one when you retry it. Then a timeout can't make you pay twice.
  4. Don't start something again to check on it. Starting is POST, and it costs money. Checking is GET /v1/generations/{id}, and it's free. Keep the id.
  5. Photos: use Prefer: wait=60. Videos: poll. Photos usually finish within a minute. Videos take minutes, so poll every poll_after_ms.
  6. Read error.code and act on it. Every error, on a refused call and on a failed generation alike, has hint (what to do) and retryable (whether the same request can work: on a failed generation, send it with a new Idempotency-Key). docs_url has more, but you don't need it to decide.
  7. Check status, not just the HTTP code. A generation that fails while you wait with Prefer: wait still answers 200, with status: "failed".
  8. Tell the person when something was refused. Don't reword a refused prompt to slip past the rules. Refusals count, and twenty in a day pause the account.
  9. Download what should last. Result links stop working at expires_at, 7 days by default. Uploaded files go after 48 hours.
  10. Never top up on your own. On insufficient_credits, send the person to top_up_url.
  11. Never print or commit the key. Read it from the environment.

The flow

GET  /v1/models                 What's on sale?
GET  /v1/models/{id}            What does this model take, and what does it cost?
POST /v1/uploads                Files: pass {url}, or get a link to PUT to
POST /v1/estimate               Is this valid, and what's the price?
POST /v1/generations            Start. Charged now. Send Idempotency-Key.
GET  /v1/generations/{id}       Until status is succeeded, failed or canceled.

status goes queued → running → succeeded, failed or canceled. A generation that fails or is canceled gives its credits back by itself: don't try to claim them.

What to do with an error

In short, with the same meaning as retryable and hint:

What you seeWhat it meansWhat to do
invalid_parameterA field is wrong. path names it and hint lists what worksFix it and send again
unknown_model, not_for_sale, no_routeNot available with these settingsPick from prices in GET /v1/models/{id}, or another model
input_refused, content_refusedAgainst the content rules, or the model refusedTell the person. Change the idea, don't reword around it
insufficient_credits, spend_limit_reachedOut of credits or over a limitTell the person. Send them to top_up_url
rate_limited, too_many_activeToo fast or too many at onceWait for Retry-After, then send the same request
provider_unavailable, generation_failedThe model failed. Credits are backTry once more with a new key, then another model
timed_outWe stopped waiting. Credits are backCheck the same id later: the result may still come, free
internalOur faultRetry with the same Idempotency-Key
invalid_api_key, missing_scope, account_suspendedThe key or the accountStop and tell the person

All of them: Errors.

Which model

Short version below. Details and prompt tips are on each model's page, starting at Models.

The jobUse
A photo of someone or something from one photo, cheap and goodnano-banana-2
The same character across many photosnano-banana-pro
A poster or anything with exact words on itgpt-image-2
Many reference photos at once, cheapseedream-5.0-flash
A photo from text alone, as cheap as it getsgrok-imagine
A talking clip from one photo, 10 seconds with sound, nearly freemuse-video
A short clip from a photo or text, or changing a clip you haveomni-flash
The best clip, up to 30 s, with photos, video and audio as referencesseedance-2.5
The same, cheaper, up to 15 sseedance-2.0-fast
A text answergpt-6-luna, or claude-opus-5.5 for harder work

Always confirm a model is on sale with GET /v1/models before relying on this table.

Writing prompts

  • Name your files. img1, img2, video1, audio1, in the order you sent them. See Files in prompts.
  • Say what to keep and what to change. Models tend to carry over anything you don't mention, like the background and the clothes in a photo.
  • Put speech in quotes, and keep it short enough to say in the clip's length: about 2 words a second.
  • Ask for simple movement. One action, a still camera. Complicated physics is where clips break.
  • Spell out exact words. For text in a photo, write the words and add that the spelling must be exact.

Connecting through MCP

If your client speaks MCP, you don't need to write any HTTP. See MCP. A tool's error comes back as a result you can read, with the same codes and hints.

Testing without spending

A nc_test_… key runs the whole API on sample results at no cost, and the word fail in a prompt makes the generation fail so you can test your error handling. See Sandbox.

On this page