# NoCam API

> One key for AI photo, video and text models, by REST and MCP.

Source: https://docs.nocamclub.com/

![A purple character in a black cap and yellow sunglasses types on a laptop in a dark neon-lit room. Made with this API.](https://docs.nocamclub.com/examples/docs-hero.jpg)

Make photos, videos and text from one API, with one key and one balance. Ask for a model by name. We pick the cheapest route that works, move to the next if it fails, and give the credits back if none can do it.

> **Are you an AI agent?** Start with [For AI agents](https://docs.nocamclub.com/for-ai-agents.md), or read [llms.txt](https://docs.nocamclub.com/llms.txt) for the map and [llms-full.txt](https://docs.nocamclub.com/llms-full.txt) for everything in one file. Every page here also exists as plain Markdown: add `.md` to its address.

## One call

```bash
curl https://api.nocamclub.com/v1/generations \
  -H "Authorization: Bearer $NOCAM_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Prefer: wait=60" \
  -d '{
    "model": "gpt-image-2",
    "input": { "prompt": "A yellow taxi in the rain at night", "resolution": "1K", "aspect_ratio": "16:9" }
  }'
```

```json
{
  "id": "gen_01a1b37b65dc7dcd8c060f296add5cf8",
  "status": "succeeded",
  "model": "gpt-image-2",
  "price": { "credits": 4, "usd": "0.04", "charged": true },
  "outputs": [{ "type": "image", "url": "https://cdn.nocamclub.com/api/8f3c…/1.png", "width": 1024, "height": 576 }]
}
```

## What you get

- **Many models, one shape.** Every model is called the same way, and `GET /v1/models/{id}` says exactly which options it takes.
- **A failed route isn't your problem.** A model can have several routes behind it. If one fails, the order moves to the next without you doing anything.
- **You pay for results.** A price is charged when a generation starts, and it comes back if the generation fails, is refused or is canceled.
- **A paid result isn't lost.** If a model finishes after we stopped waiting, the result still arrives, free of charge.
- **Errors that say what to do.** Every error has a code, a hint and a [page of its own](https://docs.nocamclub.com/errors.md), written so an agent can act on it.
- **MCP as well as REST.** Connect [Claude Code, Cursor and other agents](https://docs.nocamclub.com/mcp.md) with the same key.

## Where next

| You want to | Go to |
|---|---|
| Make your first generation in 5 minutes | [Quickstart](https://docs.nocamclub.com/quickstart.md) |
| Hand this API to an AI agent | [For AI agents](https://docs.nocamclub.com/for-ai-agents.md) |
| Pick a model | [Models](https://docs.nocamclub.com/models.md) |
| Send your own photos, videos and audio | [Uploads](https://docs.nocamclub.com/api/uploads.md) |
| Connect through MCP | [MCP](https://docs.nocamclub.com/mcp.md) |
| Generate a client | [OpenAPI document](https://docs.nocamclub.com/openapi.json) |

## Getting access

The API is open by invitation for now. Whoever invited you gives you a key and credits. A test key costs nothing and works right away: see [Sandbox](https://docs.nocamclub.com/sandbox.md).
