For the complete documentation index, see llms.txt. This page is also available as Markdown.

AVIS Documentation

Start building with open models.

User GuideAPI ReferenceIntegrations

Get started in minutes

Make your first API call in under 5 minutes.

This quickstart walks through the basic setup: create an account, generate an API key, and create your very first request. The examples use the same request in several languages, so you can start with the one that matches your stack.

Customize your first request

Explain what you're building and let AI tweak your quickstart.

GitBook Assistant

life-ring

With your first request done, use the guides for deeper setup and the API reference for endpoints and parameters.

Get started API Reference

1

Create your API key

Set up your account, then generate an API key for local testing and your first integration.

Sign in to AVIS Platform

2

Top up your account

Step 1: Click the Top Up button.

Step 2: Configure your payment:

Step 3: Fill in the required information

Step 4: Proceed with payment

3

Make your first request

Pick an API reference in our documentation, replace YOUR_API_KEY, and run.

Creating an API key
Sign in at avis.net

Go to Settings → API Keys.

Click Create key, give it a name, and save it somewhere safe — the raw key is only shown once at creation time (it can be revealed again later from the same page).

A single account may have a limit on the number of API keys. Creating past the limit returns 403 Forbidden.
## Enabling / disabling streaming

| Surface | How to stream | How to get a single JSON response |
|---|---|---|
| OpenAI (`chat/completions`, `/responses`) | `"stream": true` in the request body | `"stream": false` (default) |
| OpenAI (`images/generations`) | `"stream": true` — only honored when the resolved model's provider supports streamed image events; otherwise the request still completes, just as a single JSON response | `"stream": false` (default) |
| OpenAI (`videos`) | Not applicable — video generation is always async (submit + poll), see [OpenAI compatibility](./openai-compatibility.md) | n/a |
| Anthropic (`messages`) | `"stream": true` in the request body | `"stream": false` (default) |
| Gemini | Call `models/{model}:streamGenerateContent` instead of `models/{model}:generateContent` | Call `:generateContent` |

All streamed responses are sent as `Content-Type: text/event-stream` with `Cache-Control: no-cache, no-transform` and `Connection: keep-alive`.
## Endpoints

| Method | Path | Description |
| --- | --- | --- |
| GET | `/api/compat/v1/usage` | List generation records from `generations` table |

Auth: `Authorization: Bearer <jwt>` or `x-api-key`.

## GET /api/compat/v1/usage

Query fields:

| Field | Type | Required | Notes |
| --- | --- | --- | --- |
| `offset` | `number` | No | Default `0` |
| `limit` | `number` | No | Default `20` |

Response shape:

| Field | Type |
| --- | --- |
| `results[]` | Array of generation rows |
| `results[].id` | `string` |
| `results[].userId` | `string` |
| `results[].apiKeyId` | `string \| undefined` |
| `results[].modality` | `"text" \| "image" \| "video" \| "audio"` |
| `results[].model` | `string` |
| `results[].status` | `"succeeded" \| "failed" \| "aborted" \| "cancelled"` |
| `results[].request` | `object \| undefined` |
| `results[].usage` | `object \| undefined` |
| `results[].usdCost` | `number \| undefined` |
| `results[].durationMs` | `number \| undefined` |
| `results[].createdAt` | `datetime` |
| `total` | `number` |
| `offset` | `number` |
| `limit` | `number` |

This endpoint currently supports paging only and returns compat generation rows.

## Note About `generations` Data

This endpoint returns a **compact usage record**, including `request` payload and `usdCost`.

## Reference: `usage` By Modality (From `generations`)

Based on current real records, the `usage` payload is modality-specific.

### Text

Typical fields:

| Field | Type |
| --- | --- |
| `usage.promptTokens` | `number` |
| `usage.completionTokens` | `number` |
| `usage.totalTokens` | `number` |

### Image

Typical fields:

| Field | Type |
| --- | --- |
| `usage.generatedImages` | `number` |
| `usage.inputTokens` | `number` |
| `usage.outputTokens` | `number` |
| `usage.totalTokens` | `number` |

### Video

Typical fields:

| Field | Type |
| --- | --- |
| `usage.completionTokens` | `number` |
| `usage.totalTokens` | `number` |

The exact `usage` keys can vary by provider/model.

Base URL

Switching an existing app

POST /chat/completions

POST /images/generations

POST /videos — async job

Base URL

Switching an existing app

Nothing else in your existing Anthropic integration needs to change.

Endpoints

Method
Path
Streaming
Description

HEAD

/api/anthropic

—

Connectivity probe (no auth)

GET

/api/anthropic/v1/models

—

List available models

POST

/api/anthropic/v1/messages

✅

Messages API

anthropic-version and anthropic-beta request headers are forwarded to the upstream provider when present — see Authentication.

POST /messages

Base URL

The @google/genai SDK appends /v1beta to baseUrl automatically. Pass https://api.avis.net/api/gemini — not .../api/gemini/v1beta — or you'll get a doubled path.

Switching an existing app

Model IDs use the google/ prefix, e.g. google/gemini-2.0-flash.

Endpoints

Method
Path
Streaming
Description

HEAD

/api/gemini

—

Connectivity probe (no auth)

GET

/api/gemini/v1beta/models

—

List available models

POST

/api/gemini/v1beta/models/{model}:generateContent

—

Generate content

POST

/api/gemini/v1beta/models/{model}:streamGenerateContent

✅

Generate content, streamed

POST /models/{model}:generateContent

POST /models/{model}:streamGenerateContent

Learn more about the developer platform

Read guides, and learn more about working with the developer platform and integrating it with your own stack.

Integrations API References

Last updated

Was this helpful?