# Quickstart

> Create an account, get an API key and make your first call.

This guide takes you from zero to your first result. It uses the YouTube transcripts tool because it needs nothing but a video link.

## 1. Create an account [#1-create-an-account]

Sign in at [/login](/login) with your email address. You get a sign-in link by email, no password needed. New accounts start with **2,000 free credits**.

## 2. Get an API key [#2-get-an-api-key]

API keys start with `af_live_` and are shown to you **once**, right after you create them. We only store a hash of the key, so we cannot show it again; if you lose it, create a new one and revoke the old one.

<Callout type="warn" title="Early access">
  The dashboard page for creating and revoking keys is still being built. Until it ships, keys for early
  access are issued manually.
</Callout>

Keep the key out of your code and your repository. Put it in an environment variable instead:

```bash
export PULLWIRE_API_KEY="af_live_..."
```

## 3. Make your first call [#3-make-your-first-call]

Start a run of the `youtube-transcripts` tool. The request body is the tool's input; the [tool reference](/docs/tools#youtube-transcripts) lists every field.

<Tabs items={['cURL', 'JavaScript', 'Python']}>
<Tab value="cURL">

```bash
curl -X POST "https://pullwire.dev/api/v1/tools/youtube-transcripts/runs" \
  -H "x-api-key: $PULLWIRE_API_KEY" \
  -H "content-type: application/json" \
  -d '{"videos": ["https://www.youtube.com/watch?v=jNQXAC9IVRw"], "includeSegments": false, "maxResults": 1}'
```

</Tab>
<Tab value="JavaScript">

```js
const res = await fetch('https://pullwire.dev/api/v1/tools/youtube-transcripts/runs', {
  method: 'POST',
  headers: { 'x-api-key': process.env.PULLWIRE_API_KEY, 'content-type': 'application/json' },
  body: JSON.stringify({
    videos: ['https://www.youtube.com/watch?v=jNQXAC9IVRw'],
    includeSegments: false,
    maxResults: 1,
  }),
});
const { run, results } = await res.json();
console.log(run.status, run.creditsUsed, results[0]?.title);
```

</Tab>
<Tab value="Python">

```python
import os
import requests

res = requests.post(
    "https://pullwire.dev/api/v1/tools/youtube-transcripts/runs",
    headers={"x-api-key": os.environ["PULLWIRE_API_KEY"]},
    json={
        "videos": ["https://www.youtube.com/watch?v=jNQXAC9IVRw"],
        "includeSegments": False,
        "maxResults": 1,
    },
    timeout=60,
)
data = res.json()
print(data["run"]["status"], data["run"]["creditsUsed"])
```

</Tab>
</Tabs>

A run that finishes within 25 seconds answers with the run and its results. The response looks like this:

```json
{
  "run": {
    "id": "6f1c2a9e-0000-4000-8000-000000000000",
    "toolId": "youtube-transcripts",
    "status": "succeeded",
    "source": "api",
    "resultsCount": 1,
    "creditsUsed": 1,
    "error": null
  },
  "results": [
    {
      "videoId": "jNQXAC9IVRw",
      "url": "https://www.youtube.com/watch?v=jNQXAC9IVRw",
      "title": "Me at the zoo",
      "text": "…"
    }
  ]
}
```

<Callout title="SAMPLE">
  Illustration of the response shape, shortened. Real responses contain more fields (see the [tool
  reference](/docs/tools#youtube-transcripts)), real IDs and the real transcript.
</Callout>

## 4. Check your balance [#4-check-your-balance]

```bash
curl "https://pullwire.dev/api/v1/me" -H "x-api-key: $PULLWIRE_API_KEY"
```

The answer contains your `orgId` and your current `balance` in credits.

## Next steps [#next-steps]

- Long runs and background jobs: [Runs](/docs/runs)
- What a run costs: [Credits](/docs/credits)
- What can go wrong and what to do: [Errors](/docs/errors)
