The Camroll API
Make photos that look shot on a phone, and vertical clips that look filmed on one, from your own code. The same two models as the camera, the same prices, the same credits. Nothing is charged when a shot fails.
Quick start
- Make a key in Account › API keys, and keep it on your server (an environment variable such as
CAMROLL_API_KEY). - Send a prompt: the answer comes at once, with an id and the credits held for it.
- Read that id every 2 or 3 seconds until its status is
succeeded, then download each output'surl.
curl https://camroll.ai/v1/images/generations \
-H "Authorization: Bearer $CAMROLL_API_KEY" \
-H "Content-Type: application/json" \
-d '{"prompt": "mirror selfie in a hotel lift, flash on", "n": 4}'Base URL: https://camroll.ai/v1. Requests and answers are JSON. Every answer carries an x-request-id: quote it if you write to us.
Your key
Every request sends it as a Bearer token: Authorization: Bearer cr_live_…. A key spends your account's credits, so it never goes in a web page or an app people download: call the API from your server.
Its secret is shown once, when you make it. Lost it, or think someone saw it? Revoke it in Account › API keys (it stops at once) and make another.
Models and prices
| Model | Makes | Price |
|---|---|---|
camroll-photo | Photos from words: selfies, mirror pics, a friend's shot, flash at night. 1 to 4 a request (4 = a photo dump). | 60 credits a photo |
camroll-video | Vertical clips with the sound a phone records, from words or from a picture brought to life. | 100 credits a second (500 for 5 s) |
GET /v1/models lists both, with their prices and what each one takes (ratios, durations). It needs no key.
Make photos
POST /v1/images/generations
| Field | What it is |
|---|---|
prompt required | The moment, in words (any language, up to 2,400 characters). |
n | How many photos, 1 to 4. Default 1. |
aspect_ratio | 3:4 (default, a phone portrait), 9:16, 1:1, 4:3 or 16:9. |
negative_prompt | What to keep out of the picture. |
private | true: nothing kept on our servers. See Private mode. |
model | Default camroll-photo. |
The answer is a 202 with the generation, queued, and the credits held for it:
{
"id": "gen_2LruYpy9fLHiUq1obIPqcK",
"object": "generation",
"type": "image",
"model": "camroll-photo",
"status": "queued",
"input": {
"prompt": "mirror selfie in a hotel lift, flash on",
"n": 4,
"aspect_ratio": "3:4",
"reference_images": 0
},
"reserved_credits": 240,
"cost_credits": null,
"outputs": [
{ "id": "file_0yEVH8BmzjX1CgRw86CfzZ", "status": "queued" },
…
],
"error": null,
"created_at": "2026-11-28T18:22:40.282Z",
"completed_at": null
}Make a clip
POST /v1/videos/generations
| Field | What it is |
|---|---|
prompt required | What happens, in words. |
duration | Seconds. Default 5; the range is in GET /v1/models. |
aspect_ratio | 9:16 (default, vertical). The ratios the model takes are in GET /v1/models. |
reference_images | A picture to bring to life, as an https URL or a data:image/…;base64 URI: it is the clip's opening frame. |
end_image | A picture for the last frame. |
private | true: nothing kept on our servers. |
curl https://camroll.ai/v1/videos/generations \
-H "Authorization: Bearer $CAMROLL_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"prompt": "she laughs and turns to the camera, golden hour",
"reference_images": ["https://example.com/her-photo.jpg"]
}'Clips are 768p and always come with their sound. A clip takes a few minutes: read it every few seconds, or come back later.
Get the result
GET /v1/generations/:id
A generation goes queued → running → succeeded or failed. Each read moves it forward, so poll every 2 or 3 seconds.
curl https://camroll.ai/v1/generations/gen_2LruYpy9fLHiUq1obIPqcK \ -H "Authorization: Bearer $CAMROLL_API_KEY"
{
"id": "gen_2LruYpy9fLHiUq1obIPqcK",
"status": "succeeded",
"reserved_credits": 240,
"cost_credits": 240,
"outputs": [
{
"id": "file_0yEVH8BmzjX1CgRw86CfzZ",
"status": "succeeded",
"url": "https://camroll.ai/v1/files/file_0yEVH8BmzjX1CgRw86CfzZ?expires=…&signature=…",
"url_expires_at": "2026-11-28T19:23:01.000Z",
"cost_credits": 60,
"content_type": "image/png"
},
…
],
"completed_at": "2026-11-28T18:23:01.114Z"
}- The links work for about an hour, without a key. Read the generation again for fresh ones; your files stay in your Library until you delete them.
- The price:
cost_creditsis what was charged, never more thanreserved_credits. A photo that fails costs nothing; in a dump of four, only the photos that came out are paid for. - A failure comes with
error.codeanderror.message, in words you can show.
All of it, in JavaScript
const API = 'https://camroll.ai/v1'
const headers = {
Authorization: `Bearer ${process.env.CAMROLL_API_KEY}`,
'Content-Type': 'application/json',
}
// 1. Ask for a photo
let shot = await fetch(`${API}/images/generations`, {
method: 'POST',
headers,
body: JSON.stringify({ prompt: 'candid photo at a rooftop party, phone flash' }),
}).then(r => r.json())
// 2. Read it until it is done (a few seconds for a photo, longer for a clip)
while (shot.status === 'queued' || shot.status === 'running') {
await new Promise(done => setTimeout(done, 2500))
shot = await fetch(`${API}/generations/${shot.id}`, { headers }).then(r => r.json())
}
// 3. Download it (the link works for about an hour)
if (shot.status === 'succeeded') console.log(shot.outputs.map(o => o.url))
else console.error(shot.error)…and in Python
import os, time, requests
API = "https://camroll.ai/v1"
HEADERS = {"Authorization": f"Bearer {os.environ['CAMROLL_API_KEY']}"}
shot = requests.post(f"{API}/videos/generations", headers=HEADERS, json={
"prompt": "walking to the car at night, filmed on a phone",
}).json()
while shot["status"] in ("queued", "running"):
time.sleep(3)
shot = requests.get(f"{API}/generations/{shot['id']}", headers=HEADERS).json()
print(shot["outputs"][0]["url"] if shot["status"] == "succeeded" else shot["error"])List what you made
GET /v1/generations
Newest first, from the API and from the camera. limit (1 to 100, default 20), then cursor = the next_cursor of the page before while has_more is true. Filters: status, type (image or video), model, source (api or playground, the camera), created_after and created_before (ISO dates).
curl "https://camroll.ai/v1/generations?limit=20&type=video" \ -H "Authorization: Bearer $CAMROLL_API_KEY"
Your credits
GET /v1/account
The key, your credits (held = set aside for what is running), the content filter and your limits.
{
"object": "account",
"key": {
"id": "key_NVq4LJchj8RTcCuKFKYZ2I",
"name": "my app",
"last4": "P7Lb",
"created_at": "2026-11-28T18:22:28.479Z"
},
"credits": { "available": 1250, "held": 60 },
"content_filter": true,
"limits": { "requests_per_minute": 60, "concurrent_generations": 10 },
"usage": { "running_generations": 1 }
}Credits are bought in the app (packs and plans); they never expire.
Private mode
With "private": true, nothing of the shot is kept on our servers, not even the prompt: only its settings and its price, for your history.
- A private photo is handed over once, as a
data:URL in the answer of the read that finishes it, and never again. Read it with the key that started it: another key does not receive it. - A private clip comes with a link that works for about 30 minutes.
- If no one reads it within 20 minutes, it ends without being kept, and nothing is charged.
Errors and limits
An error answers with its HTTP status and one shape:
{
"error": {
"code": "insufficient_balance",
"message": "Your balance does not cover this request. Nothing was charged.",
"request_id": "req_fCW3nrdVhxYVhlFvMtax"
}
}| Status | Code | When |
|---|---|---|
| 400 | invalid_request | A field is missing or out of range: the message names it. |
| 400 | model_not_found | An unknown model, or a photo model sent to the video endpoint (or the other way round). |
| 400 | content_filtered | The content filter refused the prompt. Nothing was charged. |
| 401 | unauthorized | No key, a wrong key, or a revoked one. |
| 402 | insufficient_balance | Your credits do not cover the request. Nothing was charged. |
| 404 | not_found | No such generation (or endpoint) for this key. |
| 429 | rate_limited | More than 60 requests that start work in a minute. Wait for Retry-After. |
| 429 | concurrency_limit | 10 generations already running (the app's included). Retry when one ends. |
| 503 | service_unavailable | The camera is busy or down for a moment. Nothing was charged: try again. |
A request that starts work counts against your minute: the answer says where you stand (X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset), and past it a 429 says when to retry (Retry-After, in seconds). Reads are not counted. Retrying a POST starts a new generation: read the first one before you send it again.
The content filter is on by default; you can turn it off in Account › Preferences once you confirm your age. Everything made follows the acceptable use policy, and every photo and clip is AI-generated: say so where you post it.
Questions, or a higher limit? Write to hello@camroll.ai.