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

# Create an API key and call a model

> Create a PowerTokens API key, then call a model through the platform API or Playground.

After you create an API key, you can call chat, image, video, and audio models through the platform API or the **Playground**.

## Create an API key

Open [**API Keys**](https://www.powertokens.ai/en/api-keys).

<img src="https://mintcdn.com/limeng/1Q_5Y1KRbqGZ9yFj/images/guides/powertokens-quickstart/en/api-keys.jpg?fit=max&auto=format&n=1Q_5Y1KRbqGZ9yFj&q=85&s=73512d1c0bbd8b3d134bc6261b69e45b" alt="PowerTokens API Keys page" width="1920" height="911" data-path="images/guides/powertokens-quickstart/en/api-keys.jpg" />

Click **Create new key** in the upper-right corner.

<img src="https://mintcdn.com/limeng/1Q_5Y1KRbqGZ9yFj/images/guides/powertokens-quickstart/en/create-api-key.jpg?fit=max&auto=format&n=1Q_5Y1KRbqGZ9yFj&q=85&s=877f9856c5a987604d56f18c3eb11072" alt="Create a PowerTokens API key" width="568" height="484" data-path="images/guides/powertokens-quickstart/en/create-api-key.jpg" />

When you create a key, you can configure:

* **Key name**: Use a clear name, such as `LLM-key`, so you can manage keys by project.
* **Usage limit**: Set unlimited usage or a fixed Credits limit. When the key reaches the limit, it stops working.
* **Reset type**: Choose no reset, daily, weekly, or monthly reset. Weekly and monthly resets use UTC time.
* **Expiration**: Choose no expiration, 7 days, or 30 days.

An API key is shown only once when you create it. Store it securely, and do not expose it in client-side code, public repositories, or chat logs.

## Browse the model catalog

Open [**Models**](https://www.powertokens.ai/en/models) and choose the LLM, image, video, or audio model you need.

<img src="https://mintcdn.com/limeng/1Q_5Y1KRbqGZ9yFj/images/guides/powertokens-quickstart/en/models.jpg?fit=max&auto=format&n=1Q_5Y1KRbqGZ9yFj&q=85&s=261d560b08c5af322f92850ea943722a" alt="PowerTokens model catalog" width="1920" height="911" data-path="images/guides/powertokens-quickstart/en/models.jpg" />

The model detail page shows capabilities, pricing, and available request methods. Models such as MiniMax are exposed as upstream provider capabilities through PowerTokens. You call them through the unified platform API.

## Call a model with the API

PowerTokens provides OpenAI-compatible APIs. For most OpenAI SDKs, update the Base URL and use the API key you created.

Base URL:

```txt theme={null}
https://api.powertokens.ai
```

Headers:

```txt theme={null}
Authorization: Bearer <token>
Content-Type: application/json
```

Example request:

```bash theme={null}
curl --request POST \
  --url https://api.powertokens.ai/v1/chat/completions \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
    "model": "MiniMax-M3",
    "messages": [
      {
        "role": "system",
        "content": "You are a concise assistant."
      },
      {
        "role": "user",
        "content": "Describe Paris in one sentence."
      }
    ],
    "temperature": 0.3
  }'
```

Before production integration, check the target model page for supported parameters, request fields, and response format.

## Debug models in the Playground

Open [**Models**](https://www.powertokens.ai/en/models), then open a model detail page. You can test model behavior in the **Playground** without writing code first.

<img src="https://mintcdn.com/limeng/1Q_5Y1KRbqGZ9yFj/images/guides/powertokens-quickstart/en/playground.jpg?fit=max&auto=format&n=1Q_5Y1KRbqGZ9yFj&q=85&s=4c5c26a612364149d18a8066f3dbcac7" alt="PowerTokens Playground" width="1920" height="911" data-path="images/guides/powertokens-quickstart/en/playground.jpg" />

Use the Playground to:

* Debug prompts
* Compare model outputs
* Test parameters
* Validate prototypes

After your first request, continue with [View logs and usage stats](/en/guides/logs-and-usage).
