Cheap, fast & reliable video infrastructure.

Upload a video and get back an adaptive stream up to 4K, an MP4, a poster and a hosted player. Uploading and encoding are free.

Cap Infra is in preview. Email hello@cap.so for access.

Bring your agent.

Add your app's secret key to your project and paste one prompt. Your agent reads the API docs, wires up uploads and playback, and keeps the key on the server.

Cap Infra is in preview. Email hello@cap.so for access.

Paste this into your agentWorks in Claude Code, Codex, Cursor and any coding agent that can work in your project.

Set up Cap Infra in this project so it can upload and play video.

Cap Infra is Cap's video and speech API. All you need is the app's secret key and the REST API. Read https://cap.so/openapi.json and https://cap.so/docs/api/rest-api first. Use only the methods and paths documented there, and take every field name from the OpenAPI document.

1. Find the secret key. I created the app in the Cap Infra console and put its secret key (csk_) in this project's local environment file as CAP_SECRET_KEY. Check that the variable is set without printing its value, and that the file is ignored by git. If it is missing, stop and ask me to add it to the file. Never ask me to paste the key into the chat, and never print, log or commit it.
2. Keep the key on the server. Send it only from server code, as Authorization: Bearer followed by the key. It never goes into browser code, a client bundle or a public environment variable.
3. Create uploads on the server. For a signed-in user, call POST /api/developer/v1/uploads and give the browser only what it returns for that one video: the upload token (cut_), the video id and the embed URL. In production, set corsOrigin to the site's origin.
4. Upload from the browser. With the upload token as the Bearer credential, call POST /api/developer/sdk/v1/upload/multipart/initiate, then POST /api/developer/sdk/v1/upload/multipart/presign-part with up to 50 part numbers in one request. PUT each part to its signed URL and keep the ETag it answers with, then call POST /api/developer/sdk/v1/upload/multipart/complete. If a call answers 401 with the code upload_token_expired, get a new token from the server with POST /api/developer/v1/uploads/{id}/token and continue with the same uploadId and ETags.
5. Wait until it plays. From the server, poll GET /api/developer/v1/videos/{id}/status no faster than once every 2 seconds. Stop when status is ready or errored, and show errorReason if it failed.
6. Play it. Show the video with its embedUrl, or build a player from hlsUrl and mp4Url in GET /api/developer/v1/videos/{id}. Use hlsUrl when it is present and mp4Url otherwise. shareUrl is the link to send to someone.
7. Transcribe when I ask. Transcripts are billed per audio hour, so confirm with me first. For a public URL call POST /api/developer/v1/transcripts. For a file call POST /api/developer/v1/transcripts/uploads, PUT the file to the signed URL it returns, then call POST /api/developer/v1/transcripts/{id}/start. Poll GET /api/developer/v1/transcripts/{id} at the same pace until status is complete or error.
8. Stay inside the limit. A secret key allows 60 requests a minute across every endpoint. After a 429, wait for the number of seconds in the Retry-After header before you send the request again.
9. Watch the credits. GET /api/developer/v1/usage shows the balance and whether uploads are allowed. A 402 means the app needs credit, so tell me and I will add it in the console.

Finish by uploading one short test video through the code you wrote. Ask me first, because stored video is billed daily. Then tell me what you changed and give me the video's shareUrl, and ask what I want to build next.

Or link your agent to this page. The prompt is on it.

Read https://cap.so/infra and set up Cap Infra for this project.

Fast to first play.

In our tests, a video was playable seconds after its upload finished.

From upload finished to playable

about3seconds

for a short clip

about15seconds

for a 20 minute 4K screen recording

Measured on production from a cloud machine. For short clips, the adaptive streaming renditions followed within seconds.

One upload. Every resolution.

Your server creates an upload and gets a short-lived token. The browser or your server sends the file with it, and Cap encodes it for every screen.

An upload is encoded to renditions from 4K, 1440p, 1080p, 720p, 360p, never above the source resolution.
Adaptive HLS
Up to five renditions from 360p to 4K, never above the source.
MP4
One file for downloads and as a fallback.
Poster
A frame from the video to show before playback.
Hosted player
A link to a player page, ready when the video is created.
Iframe embed
The same player for your own pages.

curl

curl -X POST https://cap.so/api/developer/v1/uploads \
  -H "Authorization: Bearer csk_your_secret_key_here" \
  -H "Content-Type: application/json" \
  -d '{"name": "User Recording", "userId": "user_42", "corsOrigin": "https://app.example.com"}'

curl https://cap.so/api/developer/v1/videos/abc123def456/status \
  -H "Authorization: Bearer csk_your_secret_key_here"

When it is ready

{
  "data": {
    "id": "abc123def456",
    "externalUserId": "user_42",
    "duration": 124.5,
    "width": 1920,
    "height": 1080,
    "transcriptionStatus": null,
    "ready": true,
    "status": "ready",
    "errorReason": null,
    "playbackId": "Zk3vQ9s2Lm8Rt1Xy7Bc4Df6G",
    "renditions": [
      { "name": "1080p", "width": 1920, "height": 1080, "bitrate": 3565000, "bytes": 55480000, "codecs": "avc1.640028,mp4a.40.2" },
      { "name": "720p", "width": 1280, "height": 720, "bitrate": 1161000, "bytes": 18070000, "codecs": "avc1.64001f,mp4a.40.2" },
      { "name": "360p", "width": 640, "height": 360, "bitrate": 261000, "bytes": 4060000, "codecs": "avc1.64001e,mp4a.40.2" }
    ],
    "hlsUrl": "https://cap.so/api/developer/playback/Zk3vQ9s2Lm8Rt1Xy7Bc4Df6G/master.m3u8",
    "mp4Url": "https://cap.so/api/developer/playback/Zk3vQ9s2Lm8Rt1Xy7Bc4Df6G/video.mp4",
    "posterUrl": "https://cap.so/api/developer/playback/Zk3vQ9s2Lm8Rt1Xy7Bc4Df6G/poster.jpg"
  }
}

Between the two requests, the file is sent in parts with the upload token. See Multipart Upload in the docs.

Transcribe audio or video.

Send a public URL or upload an audio or video file and get text back, with word and segment timings. No video hosting needed.

$0.10 per audio hour.

curl

curl -X POST https://cap.so/api/developer/v1/transcripts \
  -H "Authorization: Bearer csk_your_secret_key_here" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: standup-2026-11-11" \
  -d '{"url": "https://example.com/standup.mp3"}'

Play it anywhere.

A ready video has an HLS URL, an MP4 URL and a poster that work in any player. One of the two can still be encoding when the video becomes ready, so play whichever is present. Or use the hosted player link or the iframe embed and build nothing.

The embed takes autoplay, muted, loop, start time and controls as query parameters.

<iframe
  src="https://cap.so/dev/Zk3vQ9s2Lm8Rt1Xy7Bc4Df6G/embed"
  title="Product Demo"
  style="width: 100%; aspect-ratio: 16 / 9; border: 0"
  allow="fullscreen; picture-in-picture"
  allowfullscreen
  loading="lazy"
></iframe>

Pay for minutes, not plans.

Two things are charged: stored video and speech to text. Uploading and encoding are free. Credits are prepaid.

Cap Infra prices by resolution
Meter1080p1440p4K
Uploading and encodingat every resolutionFree
Storageper 1,000 minutes, per month$0.85$1.45$2.80
Speech to textper hour of audio$0.10
Playera hosted page and an iframe embedIncluded

A video is billed by its length and resolution tier once it is ready to play. Videos are encoded up to 1080p by default, and 1440p and 4K are set per upload.

Estimate your bill.

Resolution

Sets the storage rate

Resolution to estimate

$0.85 per 1,000 minutes, per month

min

$0.10 per hour of audio

hr

Estimated month

$14.25

Storage
$4.25
Speech to text
$10.00
Uploading and encoding
Free
Request access

$5 of credit every month with Cap Pro.

Cap Pro includes $5 of Cap Infra credit every month. Claim it from an app's Billing page and your usage is drawn from it.

What $5 covers at 1080pEither one, every month
minutes stored for 30 days
5,800
hours transcribed
50

Worked out from the prices above and rounded down.

Questions

The full reference is in the docs.

Who can use Cap Infra today?

Cap Infra is in preview. Email hello@cap.so for access.

What does Cap Infra charge for?

Two things: stored video and speech to text. Uploading and encoding are free at every resolution.

How does resolution change the price?

Storage is priced per 1,000 minutes a month by resolution tier: $0.85 up to 1080p, $1.45 at 1440p and $2.80 at 4K. A video is billed at the lower of its source resolution and the tier it was created with. The default tier is 1080p, and 1440p and 4K are set per upload.

How do I pay?

With prepaid credits. Each app has its own balance, and auto top-up can add credit from a saved card when the balance runs low. There are no seats and no plans. Cap Pro includes $5 of credit every month.

Do I have to use the Cap player?

No. A ready video has an HLS URL and an MP4 URL that need no API key and work in any player. One can still be encoding when the video becomes ready, so play whichever is present. The hosted player is there when you want a link or an iframe embed with nothing to build.

Can I use the speech API without hosting my video on Cap?

Yes. Send a public URL or upload an audio or video file and get a transcript back, at $0.10 per hour of audio. Uploaded videos are not transcribed automatically.

How do I know when a video is ready?

Check the video's status from your server every few seconds until it is ready or errored. A video is ready as soon as its first output can be played, and the other output follows.

How do API keys work?

Each app has a secret key that stays on your server. Your server creates an upload and gives the browser a short-lived upload token that works for that one video.

Is Cap Infra compliant for sensitive video?

Cap is SOC 2 Type II, ISO 27001 and HIPAA compliant, and a BAA is available. Cap is open source.

Cheap, fast & reliable video infrastructure.

SOC 2 Type II, ISO 27001 and HIPAA compliant. BAA available. Open source.