Skip to content

Quickstart

You need a Verda account with a project balance of at least $1. The minimum top-up is $20. See Topping up in the console.

1. Enable a model

  1. In the Console, open Inference > Models.
  2. Find the model you want and click Enable.

The Quick start window opens with a new API key for your project. Copy the key now: it's shown only once.

If you close the window before copying it, open the model's page and click Create API key, or create one on the Credentials page. See Inference API Keys.

2. Set your environment

Save your base URL and key as environment variables, for example in a .env file:

# Base endpoint and key (used by the curl and SDK snippets on this page)
VERDA_INFERENCE_BASE_URL=https://inference.verda.com
VERDA_INFERENCE_API_KEY=<your key>

# Picked up automatically by OpenAI SDKs
OPENAI_BASE_URL=https://inference.verda.com/v1
OPENAI_API_KEY=${VERDA_INFERENCE_API_KEY}

# If you set the OPENAI_* variables above, the SDKs pick them up automatically
# and you can drop the explicit base_url/api_key arguments from the code below.

3. Make your first call

The examples call Kimi K3.1 Pro. Kimi reasons before it answers, at max effort by default, so max_tokens leaves room for reasoning and the answer. For a faster, lower-cost answer, add "reasoning_effort": "low". See Reasoning. To call another model, change model to its model ID.

curl -X POST "https://inference.verda.com/v1/chat/completions" \
  -H "Authorization: Bearer <your key>" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "kimi-k3-1-pro",
    "messages": [{"role": "user", "content": "What is the best viewpoint in Helsinki?"}],
    "max_tokens": 8192
  }'

Install the SDK with pip install openai, then run:

import os

from openai import OpenAI

client = OpenAI(
    base_url=f"{os.environ['VERDA_INFERENCE_BASE_URL']}/v1",
    api_key=os.environ["VERDA_INFERENCE_API_KEY"],
)

resp = client.chat.completions.create(
    model="kimi-k3-1-pro",
    messages=[{"role": "user", "content": "What is the best viewpoint in Helsinki?"}],
    max_tokens=8192,
)
print(resp.choices[0].message.content or resp.choices[0].message.reasoning_content)
print(resp.usage)

Install the SDK with npm install openai, then run:

import OpenAI from "openai";

const baseUrl = process.env.VERDA_INFERENCE_BASE_URL;
const apiKey = process.env.VERDA_INFERENCE_API_KEY;

const client = new OpenAI({
  baseURL: `${baseUrl}/v1`,
  apiKey,
});

const resp = await client.chat.completions.create({
  model: "kimi-k3-1-pro",
  messages: [{ role: "user", content: "What is the best viewpoint in Helsinki?" }],
  max_tokens: 8192,
});

console.log(resp.choices[0].message.content);
console.log(resp.usage);

The response includes usage, with the input and output tokens you're billed for. Reasoning counts as output tokens.

4. Check your usage

Open Inference > Usage in the Console. It shows the tokens in, cached tokens and tokens out for each model and day (in UTC), from both the API and the Console. Click Download to export them as CSV.

Try a model in the Playground

Each model's page has a Playground tab where you can chat with the model in your browser. The Playground uses an API key of your project, and its usage is billed like any other request. It takes text only: to send images, use the API.

Next steps