Guide
Getting started
Create an API key, spend some credits, and get a video back. Four steps, about five minutes of waiting.
#1. Create an API key
Go to trypitch.co/api-keys and press Create key. Pitch keys start with pk_.
The full key is shown once. We store only its SHA-256 hash, so we cannot show it to you again or recover it. Copy it somewhere safe. If you lose it, revoke it and make a new one.
The key acts as the user who made it. Projects it creates belong to that user, show up in their app, and spend that user’s credits.
#2. Check your credits
curl https://api.trypitch.co/v1/credits \
-H "Authorization: Bearer pk_your_key"{
"balance": 1840,
"plan": "pro",
"transactions": [ ... ]
}The final cost depends on model usage, skill loading, and render time. If the balance is short, project creation fails with 402 insufficient_credits and nothing is charged. Buy more at trypitch.co/pricing.
#3. Create a project
Write the first prompt the way you would in the app: describe what you want and attach any source files. The agent chooses the appropriate tools. You do not need a script.
curl -X POST https://api.trypitch.co/v1/projects \
-H "Authorization: Bearer pk_your_key" \
-H "Content-Type: application/json" \
-d '{
"prompt": "https://trypitch.co — walk through sign-up and the first render. Keep it under 60 seconds."
}'It answers 202 Accepted as soon as the agent has started.
{
"id": "cm4x8k2p90001abcd",
"title": "trypitch.co",
"status": "working",
"busy": true,
"prompt": "https://trypitch.co — walk through sign-up and the first render. Keep it under 60 seconds.",
"options": {},
"outputs": [],
"thumbnailUrl": null,
"shareUrl": null,
"error": null,
"createdAt": "2026-09-02T10:14:03.221Z",
"updatedAt": "2026-09-02T10:14:03.221Z"
}#4. Poll for the result
Ask for the project every few seconds until status stops being working. Ten seconds is a good interval. Most videos land in a few minutes.
curl https://api.trypitch.co/v1/projects/cm4x8k2p90001abcd \
-H "Authorization: Bearer pk_your_key"{
"id": "cm4x8k2p90001abcd",
"title": "trypitch.co",
"status": "ready",
"busy": false,
"outputs": [
{
"kind": "video",
"url": "https://s3.trypitch.co/pitch/.../final.mp4",
"createdAt": "2026-09-02T10:19:41.010Z"
}
],
"thumbnailUrl": "https://s3.trypitch.co/pitch/.../thumb.jpg",
"shareUrl": null,
"error": null,
"scenes": [ ... ]
}Download the video entry in outputs and you are done. A full polling loop with backoff is in Polling projects.
#5. Change something (optional)
The project is a conversation. Send another usage-metered message and the same agent edits what it made.
curl -X POST https://api.trypitch.co/v1/projects/cm4x8k2p90001abcd/prompt \
-H "Authorization: Bearer pk_your_key" \
-H "Content-Type: application/json" \
-d '{ "text": "Cut the intro shorter and slow the narration down a little." }'status goes back to working. Poll again, and the newest entry in outputs is the new cut.
#The same thing in Node
const KEY = process.env.PITCH_API_KEY
const api = (path, init) =>
fetch("https://api.trypitch.co" + path, {
...init,
headers: {
Authorization: `Bearer ${KEY}`,
"Content-Type": "application/json",
...init?.headers,
},
}).then(async r => {
const body = await r.json()
if (!r.ok) throw new Error(body.error?.message ?? r.statusText)
return body
})
const project = await api("/v1/projects", {
method: "POST",
body: JSON.stringify({
prompt: "https://trypitch.co — walk through sign-up. Under 60 seconds.",
}),
})
let state = project
while (state.status === "working") {
await new Promise(r => setTimeout(r, 10_000))
state = await api(`/v1/projects/${project.id}`)
}
if (state.status !== "ready") throw new Error(state.error ?? state.status)
console.log(state.outputs.find(o => o.kind === "video")?.url)#Next
- Connect an agent instead of writing code: AI agents (MCP).
- Every endpoint and field: REST API reference.
- What each failure means: Errors.