Getting Started

Quickstart

Three steps: get a key, pick a model, send a message.

1. Get an API key

Create one from the API Keys tab under Developers → API on dravenai.lat. See Generating an API Key for the full walkthrough.

2. Send a request

curl https://api.dravenai.lat/v1/chat/completions \
  -H "Authorization: Bearer sk-drv-your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "your-model-id",
    "messages": [
      { "role": "user", "content": "Hello, what is Draven AI?" }
    ]
  }'
from openai import OpenAI

client = OpenAI(
    base_url="https://api.dravenai.lat/v1",
    api_key="sk-drv-your-api-key",
)

completion = client.chat.completions.create(
    model="your-model-id",
    messages=[
        {"role": "user", "content": "Hello, what is Draven AI?"}
    ],
)

print(completion.choices[0].message.content)
import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "https://api.dravenai.lat/v1",
  apiKey: "sk-drv-your-api-key",
});

const completion = await client.chat.completions.create({
  model: "your-model-id",
  messages: [
    { role: "user", content: "Hello, what is Draven AI?" }
  ],
});

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

3. Read the response

200 OK
{
  "id": "chatcmpl-a1b2c3...",
  "object": "chat.completion",
  "created": 1750000000,
  "model": "your-model-id",
  "choices": [{
    "index": 0,
    "message": { "role": "assistant", "content": "Draven AI is an OpenAI-compatible chat API." },
    "finish_reason": "stop"
  }],
  "usage": { "prompt_tokens": 14, "completion_tokens": 9, "total_tokens": 23 }
}

That's the whole loop. From here: see every available parameter in Chat Completions, get tokens as they're generated in Streaming, or check your budget in Rate Limits.