Skip to content

DocsGetting started

Quickstart

Avenro is an OpenAI-compatible API. If your code already talks to OpenAI, you change the base URL and the API key.

Three steps

  1. Create an account, then create a key under API keys. The key is shown once; store it as AVENRO_API_KEY.
  2. Add credits under Billing, with USDG or USDC on Robinhood Chain.
  3. Send your first request.

Your first request

The base URL is https://api.avenro.tech/v1. Every request authenticates with Authorization: Bearer $AVENRO_API_KEY.

import OpenAI from "openai";

const client = new OpenAI({
  apiKey: process.env.AVENRO_API_KEY, // avenro_live_...
  baseURL: "https://api.avenro.tech/v1",
});

const completion = await client.chat.completions.create({
  model: "deepseek-v4-pro",
  messages: [{ role: "user", content: "Hello, Avenro!" }],
});

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

Streaming

Set stream: true to receive tokens as they are generated, as server-sent events in OpenAI's format. Add stream_options: { include_usage: true } to get token usage in the final chunk.

const stream = await client.chat.completions.create({
  model: "deepseek-v4-pro",
  messages: [{ role: "user", content: "Write a haiku about GPUs." }],
  stream: true,
  stream_options: { include_usage: true }, // final chunk carries token usage
});

for await (const chunk of stream) {
  process.stdout.write(chunk.choices[0]?.delta?.content ?? "");
}

What a request costs

Every request is charged per token at the model's price on the models page. While it runs, its largest possible cost is reserved from your balance and released when it finishes. Non-streaming responses carry the exact charge in the x-avenro-cost-usd header, and the dashboard lists every request with its cost and saving.

Next

Read the chat completions reference, list models with GET /v1/models, and handle errors.