# Quickstart

Your first request in a minute, with curl or the OpenAI SDK you may already use.

## Get a key

Create an API key in the [Vultr console](https://console.vultr.com/inference/) and keep it in an environment variable, so it never lands in your code:

```bash
export VULTR_INFERENCE_API_KEY=...
```

Every request goes to `https://api.vultrinference.com/v1` with the key as a bearer token. [Authentication](/docs/get-started/authentication) has the details.

## Send a request

```bash
curl https://api.vultrinference.com/v1/chat/completions \
  -H "Authorization: Bearer $VULTR_INFERENCE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "deepseek-v4.1-flash",
    "messages": [{"role": "user", "content": "Write a haiku about the sea."}]
  }'
```

```python
import os

from openai import OpenAI

client = OpenAI(base_url="https://api.vultrinference.com/v1", api_key=os.environ["VULTR_INFERENCE_API_KEY"])

reply = client.chat.completions.create(
    model="deepseek-v4.1-flash",
    messages=[{"role": "user", "content": "Write a haiku about the sea."}],
)
print(reply.choices[0].message.content)
```

```typescript
import OpenAI from "openai";

const client = new OpenAI({ baseURL: "https://api.vultrinference.com/v1", apiKey: process.env.VULTR_INFERENCE_API_KEY });

const reply = await client.chat.completions.create({
  model: "deepseek-v4.1-flash",
  messages: [{ role: "user", content: "Write a haiku about the sea." }],
});
console.log(reply.choices[0].message.content);
```

The answer is a chat completion, in the shape OpenAI and OpenRouter use: the text is `choices[0].message.content`, and `usage` counts the tokens you are billed for. `model` in the answer is the model that wrote it.

- [`POST /v1/chat/completions`](/docs/reference/create-chat-completion.md): Create Chat Completion

## Pick a model

`model` takes any id from the model list. Leave it out on `/v1/chat/completions` or `/v1/responses` and the request goes to `deepseek-v4.1-flash`; `/v1/messages` needs it.

> [!WARNING]
> A model id that does not match any model is not an error on the chat routes: the request goes to `deepseek-v4.1-flash`, and the answer's `model` says so. Check it if you typed the id by hand.

The list is public, so it needs no key. Each entry has the model's prices, context window, the inputs it reads and the parameters it takes, with their ranges and defaults; [Models](/docs/models) shows the same list as pages.

```bash
# Every model, with its prices, limits and the parameters it reads (no API key needed)
curl https://api.vultrinference.com/v1/models

# Only the models that write text, in OpenRouter's public model shape
curl "https://api.vultrinference.com/v1/models?format=openrouter&output_modalities=text"
```

```python
import os

from openai import OpenAI

client = OpenAI(base_url="https://api.vultrinference.com/v1", api_key=os.environ["VULTR_INFERENCE_API_KEY"])

for model in client.models.list():
    print(model.id)
```

See the Chat and reasoning models: /docs/models.md

## Next

- [SDKs and compatibility](/docs/get-started/sdks): the OpenAI, Anthropic and OpenRouter SDKs, and what each route speaks.
- [Streaming](/docs/concepts/streaming): print the answer as it is written.
- [Errors](/docs/concepts/errors) and [Limits](/docs/concepts/limits): what can go wrong, and what to retry.
