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

# Inference quick start

> Create an API key and send your first chat completion request to Hyperbolic Inference in a few minutes.

This guide takes you from a new API key to your first chat completion.

## Prerequisites

> [card] [Pro plan or Organization](https://hyperbolic.ai/docs/general/account-management.md#plan)
>
> Required for personal accounts.

> [card] [Credits](https://hyperbolic.ai/docs/general/account-management.md#billing)
>
> A balance above zero.

> [card] Python or cURL
>
> Or any HTTP client.

## Make your first request

**1. Create an API key**

In the [dashboard](https://app.hyperbolic.ai/settings/api-keys), go to **Settings > API Keys** and click **Create API Key**. Copy the key, which starts with `sk_live_`. You can't view it again after you close the dialog.

To bill an Organization instead of your personal balance, switch to the Organization first, then create the key.

**2. Pick a model**

The examples below use `glm-5.3-flash`. To use another model, replace it with an ID from [Available models](https://hyperbolic.ai/docs/inference/overview.md#available-models), or copy one from the model's page under [Models](https://app.hyperbolic.ai/models).

`glm-5.3-flash` is a reasoning model: it thinks before it answers, and the thinking counts against `max_tokens`. That's why the examples set `max_tokens` to 2048. See [Reasoning models](https://hyperbolic.ai/docs/inference/text-apis.md#reasoning-models).

**3. Send a request**

> [tab] Python
>
> ```python theme={null}
> import requests
>
> url = "https://api.hyperbolic.ai/inference/v1/chat/completions"
> headers = {
>     "Content-Type": "application/json",
>     "Authorization": "Bearer YOUR_API_KEY"
> }
> data = {
>     "model": "glm-5.3-flash",
>     "messages": [
>         {"role": "user", "content": "What are three tips for learning to code?"}
>     ],
>     "max_tokens": 2048,
>     "temperature": 0.7
> }
>
> response = requests.post(url, headers=headers, json=data)
> response.raise_for_status()
> print(response.json()["choices"][0]["message"]["content"])
> ```

> [tab] OpenAI SDK
>
> ```python theme={null}
> from openai import OpenAI
>
> client = OpenAI(
>     api_key="YOUR_API_KEY",
>     base_url="https://api.hyperbolic.ai/inference/v1"
> )
>
> response = client.chat.completions.create(
>     model="glm-5.3-flash",
>     messages=[
>         {"role": "user", "content": "What are three tips for learning to code?"}
>     ],
>     max_tokens=2048,
>     temperature=0.7
> )
>
> print(response.choices[0].message.content)
> ```

> [tab] cURL
>
> ```bash theme={null}
> curl -X POST "https://api.hyperbolic.ai/inference/v1/chat/completions" \
>   -H "Content-Type: application/json" \
>   -H "Authorization: Bearer YOUR_API_KEY" \
>   -d '{
>     "model": "glm-5.3-flash",
>     "messages": [
>       {"role": "user", "content": "What are three tips for learning to code?"}
>     ],
>     "max_tokens": 2048,
>     "temperature": 0.7
>   }'
> ```

> [!WARNING]
>
> Keep your API key secret. Don't put it in client-side code or commit it to a repository. If a key leaks, revoke it under **Settings > API Keys**. Revocation takes effect within about a minute.

## Common issues

> [accordion] 403 with inference\_requires\_pro
>
> Your personal account is on the Free Tier. Upgrade with a one-time \$5 deposit: click **Upgrade to Pro for \$5** under **Settings > Plan**. Retry after about 30 seconds. Or use an Organization API key. See [Plan](https://hyperbolic.ai/docs/general/account-management.md#plan).

> [accordion] 401 with legacy\_key\_unsupported or api\_key\_malformed
>
> The key isn't an `sk_live_` key. Keys from the previous inference API aren't accepted. Create a new key under **Settings > API Keys**.

> [accordion] 402 with insufficient\_balance
>
> Your balance, or your Organization's balance, has run out. Add credits under **Billing**.

> [accordion] 404 from api.hyperbolic.xyz
>
> You're calling the previous, decommissioned API. Change the base URL to `https://api.hyperbolic.ai/inference/v1`.

See [Errors](https://hyperbolic.ai/docs/inference/errors.md) for every error code.

## Next steps

> [card] [Chat completions](https://hyperbolic.ai/docs/inference/text-apis.md)
>
> Streaming, multi-turn conversations, and parameters.

> [card] [Inference overview](https://hyperbolic.ai/docs/inference/overview.md)
>
> Pricing, billing, and the Model Playground.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.