---
title: Quickstart | RunAPI
description: Get your first AI generation running in under 5 minutes.
url: https://runapi.ai/docs/guides/quickstart.md
canonical: https://runapi.ai/docs/guides/quickstart
locale: en
---

> HTML version: https://runapi.ai/docs/guides/quickstart
> Site index for agents: https://runapi.ai/llms.txt

# Quickstart

## Step 1: Get an API Key

Create a RunAPI account and generate a key from the dashboard. Keys are
scoped per project, so you can rotate or revoke one without touching the
rest of your setup.

> Free starter credits are included with every new account.

## Step 2: Install the SDK

Pick the client for your language. Every SDK ships full type definitions
and built-in task polling.

```shell
pip install runapi
npm install runapi
go get github.com/runapi/runapi-go
```

## Step 3: Create Your First Task

Media generation is asynchronous. Submitting a task returns immediately;
`task.wait()` blocks until the output is ready.

```python
$ pip install runapi

from runapi import RunAPI

client = RunAPI()
task = client.generate(
    model="kling-v2.1",
    prompt="A cat walking on a beach",
    duration=5
)
result = task.wait()
print(result.output_url)
```

```javascript
$ npm install runapi

import RunAPI from "runapi";

const client = new RunAPI();
const task = await client.generate({
  model: "kling-v2.1",
  prompt: "A cat walking on a beach",
  duration: 5
});
const result = await task.wait();
console.log(result.outputUrl);
```

```curl
$ curl --version

curl https://runapi.ai/v1/tasks \
  -H "Authorization: Bearer $RUNAPI_KEY" \
  -d '{"model":"kling-v2.1","input":{"prompt":"A cat walking on a beach","duration":5}}'
```

```go
$ go get github.com/runapi/runapi-go

client := runapi.New()
task, _ := client.Generate(ctx, &runapi.GenerateParams{
    Model: "kling-v2.1",
    Prompt: "A cat walking on a beach",
    Duration: 5,
})
result, _ := task.Wait(ctx)
fmt.Println(result.OutputURL)
```

## Step 4: Check the Result

The completed task carries the output URL, duration, and the exact cost
deducted from your balance.

```json
{
  "task_id": "tsk_8f21c4ba",
  "status": "completed",
  "output": {
    "url": "https://cdn.runapi.ai/v/tsk_8f21c4ba.mp4",
    "duration": 5
  },
  "cost": { "amount": 0.21, "currency": "USD" }
}
```

---

## More from RunAPI

- [Home](https://runapi.ai/.md)
- [Model Catalog](https://runapi.ai/models.md)
- [Pricing](https://runapi.ai/pricing.md)
- [Providers](https://runapi.ai/models)
- [Documentation](https://runapi.ai/docs/guides)
- [SDKs](https://runapi.ai/sdk.md)
- [CLI](https://runapi.ai/cli.md)
- [MCP Server](https://runapi.ai/mcp.md)
- [Claude Code vs Cursor](https://runapi.ai/claude-code-vs-cursor.md)
- [Cursor API Setup](https://runapi.ai/cursor-api-setup.md)
- [RunAPI vs OpenRouter](https://runapi.ai/openrouter-alternative.md)
- [Enterprise](https://runapi.ai/contact.md)
- [Contact](https://runapi.ai/contact.md)
- [Terms](https://runapi.ai/terms.md)
- [Privacy](https://runapi.ai/privacy.md)
- [Site index for agents](https://runapi.ai/llms.txt)

Contact: contact@runapi.ai

## Structured data

```json
[
  {
    "@context": "https://schema.org",
    "inLanguage": "en",
    "@type": "WebSite",
    "name": "RunAPI",
    "url": "https://runapi.ai/",
    "potentialAction": {
      "@type": "SearchAction",
      "target": {
        "@type": "EntryPoint",
        "urlTemplate": "https://runapi.ai/models?q={search_term_string}"
      },
      "query-input": "required name=search_term_string"
    }
  },
  {
    "@context": "https://schema.org",
    "inLanguage": "en",
    "@type": "Organization",
    "name": "RunAPI",
    "url": "https://runapi.ai/",
    "logo": {
      "@type": "ImageObject",
      "url": "https://runapi.ai/icon.svg"
    },
    "sameAs": [
      "https://github.com/runapi-ai"
    ]
  },
  {
    "@context": "https://schema.org",
    "inLanguage": "en",
    "@type": "TechArticle",
    "headline": "Quickstart",
    "description": "Get your first AI generation running in under 5 minutes.",
    "url": "https://runapi.ai/docs/guides/quickstart",
    "mainEntityOfPage": "https://runapi.ai/docs/guides/quickstart"
  }
]
```
