> ## Documentation Index
> Fetch the complete documentation index at: https://docs.nanoclip.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Quickstart

> Upload a video or audio file, start analysis, and poll for results.

This guide uses a direct upload because it works for private files and does not require your source to be publicly reachable.

<Note>
  You can upload **audio** as well as video. Set `content_type` to an audio type (e.g. `audio/mpeg`) — see [allowed upload content types](/limits#allowed-upload-content-types). Audio sources are **transcript-only**: steps 5–6's vision call and the retake-removal section below return `422` for audio, so skip them.
</Note>

## 1. Set your API key

```bash theme={null}
export NANOCLIP_API_KEY="rk_live_..."
```

Confirm the key works and check its scopes, limits, and balance with [`GET /v1/me`](/authentication#check-a-key).

## 2. Create an upload project

```bash theme={null}
curl -X POST "https://api.nanoclip.ai/v1/projects/upload" \
  -H "Authorization: Bearer $NANOCLIP_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "filename": "demo.mp4",
    "content_type": "video/mp4"
  }'
```

Save the returned `project_id`, `upload_url`, and `upload_headers`.

## 3. Upload the source bytes

```bash theme={null}
curl -X PUT "$UPLOAD_URL" \
  -H "Content-Type: video/mp4" \
  --data-binary "@demo.mp4"
```

Use the exact `Content-Type` and headers returned by the create-upload response (for an audio upload that's your declared audio type, e.g. `audio/mpeg`). The signed URL expires, so create a new upload project if it is no longer valid.

## 4. Complete the upload

```bash theme={null}
curl -X POST "https://api.nanoclip.ai/v1/projects/proj_abc123/upload/complete" \
  -H "Authorization: Bearer $NANOCLIP_API_KEY"
```

The project is ready for analysis after upload completion succeeds.

## 5. Start transcript and vision analysis

Start transcript analysis:

```bash theme={null}
curl -X POST "https://api.nanoclip.ai/v1/projects/proj_abc123/transcript" \
  -H "Authorization: Bearer $NANOCLIP_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "language": "en",
    "requested_outputs": ["text", "speakers", "utterances", "words"]
  }'
```

`language` is required. Use a supported language tag such as `en` or `he`. Each project has one transcript analysis. Repeating the same start request while it is queued, processing, or completed returns the existing analysis state.

Start vision analysis (video sources only — returns `422` for audio):

```bash theme={null}
curl -X POST "https://api.nanoclip.ai/v1/projects/proj_abc123/vision" \
  -H "Authorization: Bearer $NANOCLIP_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "requested_outputs": ["faces", "face_tracks", "scenes"]
  }'
```

## 6. Poll for results

```bash theme={null}
curl "https://api.nanoclip.ai/v1/projects/proj_abc123/transcript" \
  -H "Authorization: Bearer $NANOCLIP_API_KEY"
```

While the analysis is running, the response status is usually `queued` or `processing`. When it completes, the response includes the requested outputs.

```bash theme={null}
curl "https://api.nanoclip.ai/v1/projects/proj_abc123/vision" \
  -H "Authorization: Bearer $NANOCLIP_API_KEY"
```

Polling returns `completed` with the requested outputs or `failed` with an error.

## Optional: remove retakes

Retake removal supports video sources only (it returns `422` for audio) and requires a `language`, one of the same [languages as transcript](/analysis#transcript-language). It marks repeated or corrected takes so you can keep the clean read.

```bash theme={null}
curl -X POST "https://api.nanoclip.ai/v1/projects/proj_abc123/retake-removal" \
  -H "Authorization: Bearer $NANOCLIP_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "language": "en"
  }'
```

Poll until the result is ready:

```bash theme={null}
curl "https://api.nanoclip.ai/v1/projects/proj_abc123/retake-removal" \
  -H "Authorization: Bearer $NANOCLIP_API_KEY"
```

## Next steps

* Use [analysis jobs](/analysis) for upload details, response shapes, and polling patterns.
* If your team uses Claude Code, copy the ready-to-use prompt from [Use with Claude Code](/claude-code).
* Use the API reference for exact request and response schemas.
