# Quickstart

Create a key, send one request, read the transcript.

**1. Create a key.** Sign in, open [API keys](https://cleanscript.ai/dashboard/api-keys) and create one. New accounts get 100 free credits, no card.

**2. Send a request** with the key in `CLEANSCRIPT_API_KEY`:

```bash
export CLEANSCRIPT_API_KEY="<key>"
curl -G https://api.cleanscript.ai/v1/transcript \
  -H "Authorization: Bearer $CLEANSCRIPT_API_KEY" \
  --data-urlencode "url=https://youtu.be/jwnez8HdN7E"
```

```python
# pip install cleanscript-ai
from cleanscript_ai import CleanScript

client = CleanScript()  # reads CLEANSCRIPT_API_KEY
print(client.transcript("https://youtu.be/jwnez8HdN7E").text)
```

```typescript
// npm install cleanscript
import { CleanScript } from "cleanscript"

const client = new CleanScript() // reads CLEANSCRIPT_API_KEY
console.log((await client.transcript("https://youtu.be/jwnez8HdN7E")).text)
```

**3. Read the result.** `text` is the whole transcript; `sections` holds it as paragraphs with their times and a link to each moment. This 4-minute video costs 1 credit, and the same request again within 6 hours is free.

```json Response (shortened)
{
  "post": { "platform": "youtube", "duration": 259.0 },
  "language": "en",
  "source": "auto",
  "text": "Out of nowhere, Microsoft just announced…",
  "sections": [{
    "title": "Microsoft's quantum breakthrough",
    "start": 2.19,
    "end": 58.11,
    "url": "https://youtu.be/jwnez8HdN7E?t=2",
    "paragraphs": [{ "start": 2.19, "end": 58.11, "text": "…" }]
  }],
  "warnings": []
}
```

## Next

- Ask for fields instead of text: `POST /v1/extract` with `{"url": "…", "prompt": "What does it say about pricing?"}`. See [Extract fields](https://cleanscript.ai/docs/extract.md).
- Use it from Claude, ChatGPT, Cursor or a coding agent: [Agents & MCP](https://cleanscript.ai/docs/agents.md).
- Every parameter and field: [API reference](https://cleanscript.ai/docs/api-reference.md).
