# One API. OpenAI and Anthropic compatible.

Point your OpenAI or Anthropic client at AVELIN. Change the base URL and the key. You get nine models, speech, web search and web scraping on one key, with a cost view for every key.

- Start building (https://avelin.ai/docs/api/quickstart)
- Read the API reference (https://avelin.ai/docs/api)

Base URL: https://api.avelin.ai

### Change two lines

AVELIN speaks the OpenAI and Anthropic wire formats, so most existing SDKs and tools keep working. Change the base URL and the API key. Then name a tier, such as avelin-pro, in the model field. To switch back, change them back.

OpenAI SDK
```python
from openai import OpenAI

client = OpenAI(
    base_url="https://api.avelin.ai/v1",  # new base URL
    api_key="sk-avelin-YOUR_KEY",         # new API key
)

resp = client.chat.completions.create(
    model="avelin-pro",
    messages=[{"role": "user", "content": "..."}],
)
```

Anthropic SDK
```python
from anthropic import Anthropic

client = Anthropic(
    base_url="https://api.avelin.ai",  # new base URL
    api_key="sk-avelin-YOUR_KEY",      # new API key
)

msg = client.messages.create(
    model="avelin-pro",
    max_tokens=1024,
    messages=[{"role": "user", "content": "..."}],
)
```

curl, OpenAI format
```bash
curl https://api.avelin.ai/v1/chat/completions \
  -H "Authorization: Bearer $AVELIN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "avelin-pro",
    "messages": [
      { "role": "user", "content": "Summarize the benefits of vendor-neutral AI." }
    ]
  }'
```

curl, Anthropic format
```bash
curl https://api.avelin.ai/v1/messages \
  -H "Authorization: Bearer $AVELIN_API_KEY" \
  -H "Content-Type: application/json" \
  -H "anthropic-version: 2023-06-01" \
  -d '{
    "model": "avelin-coding-fast",
    "max_tokens": 1024,
    "messages": [
      { "role": "user", "content": "Write a Python function to debounce calls." }
    ]
  }'
```

Tool calling
```json
{
  "model": "avelin-agentic-pro",
  "messages": [
    { "role": "user", "content": "What's the weather in Abu Dhabi?" }
  ],
  "tools": [
    {
      "type": "function",
      "function": {
        "name": "get_weather",
        "description": "Get current weather for a city",
        "parameters": {
          "type": "object",
          "properties": { "city": { "type": "string" } },
          "required": ["city"]
        }
      }
    }
  ],
  "tool_choice": "auto"
}
```
Streaming, tool calling and thinking control work on both formats. On the Anthropic format, send "thinking": { "type": "disabled" } to turn thinking off. On the OpenAI format, send "reasoning_effort": "high" to ask for deeper reasoning. Keys in the samples are placeholders.

- SDKs and tools (https://avelin.ai/docs/api/sdks)

### Two chat formats, one set of models

Use the format your code already speaks. Both reach the same nine models and return equivalent results.

Chat, model, embedding and image endpoints of the AVELIN API, with the model and list price of each.
| Endpoint | What it does | Model | List price |
| --- | --- | --- | --- |
| POST /v1/chat/completions | Chat in the OpenAI format, with streaming, tool calling and thinking control. | The nine AVELIN models | Per token |
| POST /v1/messages | Chat in the Anthropic format, with streaming, tool calling and thinking control. | The nine AVELIN models | Per token |
| GET /v1/models | Lists the models your key can use. | n/a | n/a |
| POST /v1/embeddings | Vector embeddings for search and retrieval. | bge-m3 | $0.02 per 1M tokens |
| POST /v1/images/generations | Image generation. | avelin-imagegen, avelin-imagegen-pro | $0.03 or $0.075 per image |

Model prices per token are on the price list. The nine models are described on the models page.

- Price list (https://avelin.ai/pricing)
- The nine models (https://avelin.ai/models)

### Agentic endpoints

Agents listen, speak and read the web. These endpoints use the same key and the same bill as your model calls.

Speech, web search and web scraping endpoints of the AVELIN API, with what each returns, the models and the list price.
| Endpoint | What you get | Models | List price |
| --- | --- | --- | --- |
| POST /v1/audio/transcriptions | Speech to text. Send audio, get text. | whisper-large-v3 for accuracy, whisper-large-v3-turbo for volume, avelin-stt for streaming-friendly work | $0.006 per minute |
| POST /v1/audio/speech | Text to speech. Turn text into audio. OpenAI voice names and three output formats. | tts-1 for low latency, tts-1-hd for the highest quality | $0.12 or $0.24 per 1K characters |
| POST /v2/search | Web search. Ranked results, with the result pages scraped in the same call if you ask. | n/a | $0.005 per request |
| POST /v2/scrape | Web scraping. One URL in, clean text out, ready for a model. | n/a | $0.001 per request |
| POST /v2/map, /v2/crawl, /v2/extract | Whole sites. Map a site's links, crawl it, or extract structured data. Crawl and extract run as jobs and are charged once, at the start. | n/a | $0.001, $0.010 and $0.005 per request |

List prices in US dollars, as of 3 Oct 2026. The web endpoints follow the Firecrawl v2 format and work with its SDK.

- Web endpoints reference (https://avelin.ai/docs/api/web-scraping)
- Full price reference (https://avelin.ai/docs/pricing)

### See what every key costs

Every request is counted against the key that sent it. Give each team, app or environment its own key, and the console shows usage and spend for each one, by model, as it happens.

1. Usage by key and model. Live in the console. Each record shows the key, the model, token counts, speed and status.
2. A budget on every key. Set a cap for each team, app or environment. Budget alerts warn you as a key fills.
3. Limits that act first. A key's budget and rate limits are applied before a request is answered. A key at its limit gets a 429 error.

Figure. Cost per task is counted as on the Method page: calls per task times the price of each call.
Alt text: Schematic of the cost view in the AVELIN console. Spend is split by key and by model tier, and each key has a dashed budget line. Example only, not real data.

- Method (https://avelin.ai/method)

### User management and scoped keys

Your team signs in to the web console at platform.avelin.ai. Create a separate key for each team, app or environment. Each key has its own budget and rate limits, and each can be rotated on its own.

Treat keys as secrets. Keep them out of client-side code and out of source control.

- Create a key in the console (https://platform.avelin.ai)

### How a request flows

Figure. Step 3 is yours when you name a tier, and the Decision Layer's when you use it.
Alt text: A row of five steps: your app sends a request, the key is checked, a model is chosen, the model answers, and the request is recorded.
1. Your app sends a request. It is the same call you make today, sent to api.avelin.ai with your key.
2. The key is checked. The key's budget and rate limits are applied before a request is answered.
3. A model is chosen. You name a tier, or the Decision Layer picks one for the request. Hard tasks go to a more capable model and easy tasks to a cheaper one.
4. The model answers. The answer comes back in the format you called, OpenAI or Anthropic, and streams if you ask. If a model hits a temporary error, AVELIN retries and can fail over to a backup. The price does not change.
5. The request is recorded. The usage record holds the key, the model, token counts, speed and status. Billing follows the list price of the tier.

### FAQ: Questions about the API

**Is the AVELIN API OpenAI compatible?**
Yes. Send chat requests to /v1/chat/completions with the OpenAI SDK or any tool that speaks the OpenAI format. Streaming and tool calling work, and embeddings, speech and image endpoints use the usual OpenAI paths.

**Is the AVELIN API Anthropic compatible?**
Yes. Send requests to /v1/messages with the Anthropic SDK. Streaming and tool calling work, and you control thinking on each request, for example by turning it off.

**How do I switch from my current provider?**
Change two things: the base URL and the API key. Then put an AVELIN tier, such as avelin-pro, in the model field. To switch back, change them back.
More: Quickstart (https://avelin.ai/docs/api/quickstart)

**Which agentic endpoints are included?**
Speech to text, text to speech, web search and web scraping, on the same key and the same bill as your model calls. Web scraping also covers map, crawl and extract, and the web endpoints follow the Firecrawl v2 format.
More: Web endpoints reference (https://avelin.ai/docs/api/web-scraping)

**How do I cap spend?**
Create a key for each team, app or environment, and set a budget and rate limits on it. The console shows usage and spend by key and by model, and a key that reaches its limit gets a 429 error.

**What does the API cost?**
Model calls are billed per token at public list prices, with no subscription and no minimum. Speech is priced per minute or per 1K characters, images per image, and web endpoints per request. The price reference lists every endpoint.
More: Price reference (https://avelin.ai/docs/pricing); Pricing (https://avelin.ai/pricing)

**Do you keep my prompts?**
AVELIN Cloud has zero retention by default, so we do not store your prompts or answers. We keep only the usage records needed to bill you and keep the service secure. Your prompts are not used to improve AVELIN unless you opt in. The data policy has the detail.
More: Data policy (https://avelin.ai/legal/data-policy); Privacy (https://avelin.ai/privacy)

**Can I use the Decision Layer with this API?**
Yes. The Decision Layer picks the model for every request, so you pay for top intelligence only when a task needs it. It works with AVELIN models and with your own providers, and you start with a proof of concept (POC).
More: Decision Layer (https://avelin.ai/decision-layer)

Related: Models (https://avelin.ai/models); Decision Layer (https://avelin.ai/decision-layer); Pricing (https://avelin.ai/pricing); Docs (https://avelin.ai/docs); Sovereign AI platform (https://avelin.ai/sovereign-ai-platform)

### Make your first request.

Or start a POC and see the cost per task on your own workload.

- Start building (https://avelin.ai/docs/api/quickstart)

- Request a POC (https://avelin.ai/poc#request)

- Try the live demo (https://arena.avelin.ai)

URL: https://avelin.ai/api-platform
Updated: 3 Oct 2026
