DEVELOPERS
From API key to first answer in five minutes.
The AREVIA API follows the OpenAI Chat Completions format, so your existing SDKs, frameworks and tools work after changing two lines: the base URL and the model name.
Three steps
-
01
Create a key
Sign in to AREVIA Studio, open “API keys” and create a key for your project. Keys can be limited to one environment.
-
02
Set the base URL
Point your client to https://api.areviaai.net/v1 and send the key as a Bearer token.
-
03
Send a request
Call chat completions with a model such as sevan-2. Set “stream” to true for token-by-token output.
curl https://api.areviaai.net/v1/chat/completions \
-H "Authorization: Bearer $AREVIA_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "sevan-2",
"messages": [{"role": "user", "content": "Summarise this contract in three bullet points."}]
}'
import os
from openai import OpenAI
client = OpenAI(
base_url="https://api.areviaai.net/v1" ,
api_key=os.environ["AREVIA_API_KEY"],
)
response = client.chat.completions.create(
model="sevan-2",
messages=[{"role": "user", "content": "Summarise this contract in three bullet points."}],
)
print(response.choices[0].message.content)
$ch = curl_init('https://api.areviaai.net/v1/chat/completions' );
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('AREVIA_API_KEY'),
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode([
'model' => 'sevan-2',
'messages' => [['role' => 'user', 'content' => 'Summarise this contract in three bullet points.']],
]),
]);
$response = json_decode(curl_exec($ch), true);
echo $response['choices'][0]['message']['content'];
const res = await fetch("https://api.areviaai.net/v1/chat/completions" , {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.AREVIA_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
model: "sevan-2",
messages: [{ role: "user", content: "Summarise this contract in three bullet points." }],
}),
});
const data = await res.json();
console.log(data.choices[0].message.content);
200 OKResponse
{
"id": "chatcmpl-7f3a9c2e",
"model": "sevan-2",
"choices": [{
"index": 0,
"message": {
"role": "assistant",
"content": "1. Term: 36 months from the date of signing.\n2. Rate: 11.5% per year, fixed.\n3. Early repayment is allowed without penalty."
},
"finish_reason": "stop"
}],
"usage": { "prompt_tokens": 1843, "completion_tokens": 96 }
}
What the API supports
-
01
Chat completions
Multi-turn conversations with system instructions, in the languages your users speak.
-
02
Streaming
Token-by-token output over server-sent events for responsive interfaces.
-
03
Function calling
The model calls your internal APIs with validated, typed arguments.
-
04
Structured output
Valid JSON that matches the schema you provide, every time.
-
05
Embeddings
Cross-lingual vectors for search and retrieval with Garni.
-
06
Batch processing
Large asynchronous jobs at half the price of real-time requests.
Endpoints
BASE URLhttps://api.areviaai.net/v1
| METHOD | PATH | DESCRIPTION |
|---|---|---|
| POST | /v1/chat/completions |
Generate a response from a language model |
| POST | /v1/embeddings |
Create vector representations of text |
| POST | /v1/audio/transcriptions |
Transcribe audio to text |
| POST | /v1/audio/speech |
Synthesise speech from text |
| POST | /v1/moderations |
Check content and mask personal data |
| POST | /v1/batches |
Submit an asynchronous batch job |
| GET | /v1/models |
List the models available to your key |
Default rate limits
| PLAN | REQUESTS PER MINUTE | TOKENS PER MINUTE | BATCH QUEUE, TOKENS |
|---|---|---|---|
| Developer | 60 | 200,000 | 1,000,000 |
| Business | 600 | 2,000,000 | 50,000,000 |
| Enterprise | Custom | Custom | Custom |
Limits are raised on request, usually within one business day.
TOOLING
Works with what you already use
Official OpenAI SDKs for Python and JavaScript, LangChain, LlamaIndex and any HTTP client. No proprietary SDK is required: the PHP example on this page uses nothing but cURL.