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

# Send your first request

> Call your Provisioned Throughput endpoint by changing the base URL, the API key, and the model ID in the SDK you already use.

Your endpoint is compatible with the **OpenAI Chat Completions API** and the **Anthropic Messages API**. Keep the SDK you already use and change the base URL and the API key, then pass the model ID in the `model` field.

## Prerequisites

* An active contract. The model's **Deploy options** card shows **Provisioned capacity is live**. See [Manage your contract](/inference/contracts).
* Your API key, issued when the contract starts (or the sample key during the proof of concept).
* The model ID, copied from the model page. See [Browse models](/inference/models).

## Endpoint

|                    |                                                                          |
| ------------------ | ------------------------------------------------------------------------ |
| **Base URL**       | `https://inference.cloud.vessl.ai/v1`                                    |
| **Authentication** | Your API key, sent as a bearer token (`Authorization: Bearer <api-key>`) |
| **Model**          | The model ID shown next to the model name on the model page              |

## Example request

Set your API key as the `VESSL_API_KEY` environment variable first:

```bash theme={null}
export VESSL_API_KEY="<api-key>"
```

<CodeGroup>
  ```bash cURL theme={null}
  curl https://inference.cloud.vessl.ai/v1/chat/completions \
    -H "Authorization: Bearer $VESSL_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "model": "<model-id>",
      "messages": [
        {"role": "user", "content": "Hello! Who are you?"}
      ]
    }'
  ```

  ```python Python theme={null}
  import json
  import os
  import urllib.request

  request = urllib.request.Request(
      "https://inference.cloud.vessl.ai/v1/chat/completions",
      method="POST",
      headers={
          "Authorization": f"Bearer {os.environ['VESSL_API_KEY']}",
          "Content-Type": "application/json",
      },
      data=json.dumps({
          "model": "<model-id>",
          "messages": [
              {"role": "user", "content": "Hello! Who are you?"},
          ],
      }).encode(),
  )

  with urllib.request.urlopen(request, timeout=120) as response:
      body = json.load(response)

  print(body["choices"][0]["message"]["content"])
  ```

  ```typescript TypeScript theme={null}
  const response = await fetch("https://inference.cloud.vessl.ai/v1/chat/completions", {
    method: "POST",
    headers: {
      Authorization: `Bearer ${process.env.VESSL_API_KEY}`,
      "Content-Type": "application/json",
    },
    body: JSON.stringify({
      model: "<model-id>",
      messages: [
        { role: "user", content: "Hello! Who are you?" },
      ],
    }),
  });

  if (!response.ok) {
    throw new Error(`Request failed: ${response.status} ${await response.text()}`);
  }

  const body = await response.json();
  console.log(body.choices[0].message.content);
  ```
</CodeGroup>

<Tip>
  **Get started** on the model page opens these same requests with that model's ID already filled in.
</Tip>

## Check the dashboard

Once traffic flows through your endpoint, the model page's **Usage summary** shows token usage and cost, and the **Monitoring Dashboard** tracks token usage, performance, and reliability. See [Monitor inference status](/inference/monitor-usage).
