Quickstart
Make your first API call to an Avra model, then follow the path from one prediction problem to scores in production.
There are two ways to start. If your organization already has models in Avra, start by making your first API call. If you’re starting a project, follow the path to production further down: bring one prediction problem and your historical outcomes, and that’s enough to start.
Make your first API call
You need access to app.avra.ai and at least one model available to your organization, with a version behind the production alias. The examples call a GFM model, whose input is a company’s CNPJ; any model works the same way, with the inputs its schema declares.
Create an API key
In the dashboard, go to Settings → Workspace → API keys and create a key. Keep it in an environment variable, never in code:
export AVRA_API_KEY="<your key>"List your models
Every model available to your organization has an id, the model_id the next steps take, and its type tells models apart, such as credit and embedding models.
curl https://api.avra.ai/v1/api/models \
-H "Authorization: Bearer $AVRA_API_KEY"import os
import requests
API = "https://api.avra.ai"
headers = {"Authorization": f"Bearer {os.environ['AVRA_API_KEY']}"}
response = requests.get(f"{API}/v1/api/models", headers=headers, timeout=30)
response.raise_for_status()
print(response.json())const API = "https://api.avra.ai";
const headers = { Authorization: `Bearer ${process.env.AVRA_API_KEY}` };
const response = await fetch(`${API}/v1/api/models`, { headers });
if (!response.ok) throw new Error(`${response.status} ${await response.text()}`);
console.log(await response.json());Read the version's schema
Read the version behind the production alias. Its schema lists the inputs the model takes and the outputs it returns, each with a name, a type, whether it’s optional, and an example.
curl https://api.avra.ai/v1/api/models/{model_id}/versions/production \
-H "Authorization: Bearer $AVRA_API_KEY"Call the model
Send the inputs the schema declares, with an X-Correlation-Id header so the request can be traced later.
curl -X POST https://api.avra.ai/v1/api/prediction/{model_id}/production \
-H "Authorization: Bearer $AVRA_API_KEY" \
-H "Content-Type: application/json" \
-H "X-Correlation-Id: $(uuidgen)" \
-d '{"cnpj": "12345678000199"}'import os
import uuid
import requests
API = "https://api.avra.ai"
MODEL_ID = "<model_id>"
response = requests.post(
f"{API}/v1/api/prediction/{MODEL_ID}/production",
headers={
"Authorization": f"Bearer {os.environ['AVRA_API_KEY']}",
"X-Correlation-Id": str(uuid.uuid4()),
},
json={"cnpj": "12345678000199"},
timeout=30,
)
response.raise_for_status()
print(response.json()["result"])const API = "https://api.avra.ai";
const MODEL_ID = "<model_id>";
const response = await fetch(`${API}/v1/api/prediction/${MODEL_ID}/production`, {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.AVRA_API_KEY}`,
"Content-Type": "application/json",
"X-Correlation-Id": crypto.randomUUID(),
},
body: JSON.stringify({ cnpj: "12345678000199" }),
});
if (!response.ok) throw new Error(`${response.status} ${await response.text()}`);
console.log((await response.json()).result);A successful call returns 200 with status set to completed, and result holds the outputs the version’s schema declares:
{
"operation_id": "...",
"status": "completed",
"result": { }
}
From here, see Live predictions for limits, errors, and tracing, and Batch inference to score many records at once.
The path to production
Scope the problem
Contact Avra at avra.ai/contact. Start with one decision: who you score, the outcome that matters, its horizon, and the system that consumes the answer. Choose where Avra runs: Avra’s cloud, or inside your environment.
Get your workspace
Avra provisions a tenant-isolated workspace. You get access to app.avra.ai, where you invite your team and create API keys.
Bring your data
Send the tables you already keep, linked by their keys, with your historical outcomes. Every delivery goes through Avra’s ingestion pipeline, which checks it against your data contract before anything is published. A delivery that fails a blocking check is rejected with the reason, instead of failing silently. See Preparing your data.
Frame the prediction and backtest
Frame the prediction with your Avra team: the records to score, the outcome, and its window. See What you can predict. Avra RFM predicts in context from your history, so there’s no training project in between. The first result is a backtest on your own data, at past dates whose outcomes are known, compared with the model you run today.
Shadow
Run Avra beside your current model on live traffic. Same inputs, two answers, and no effect on the decision until the comparison is settled.
Promote
Reassign the production alias to the version that earned it, in the dashboard. Rolling back is reassigning it again. See Model versioning.
Where it pays, a copy of the RFM can also be adapted to your database or fine-tuned on your task. The copy is exclusive to your workspace. See Adaptation and fine-tuning.
Once you’re live
Live predictions
Score one record at a time through the API
Batch inference
Score entire portfolios asynchronously
Embeddings
Add Avra’s embeddings to the models you already run
Dashboard
Models, batches, alerts, audit, and access in one place
Where to go from here
I want to understand the platform first
Read Why Avra and Models, then the Avra RFM concepts: relational data, what you can predict, and how predictions work. Then Data ingestion and Deployment.
I want to see specific use cases
Credit, Fraud, Acquisition, or embeddings for the models you already run.
I'm ready to integrate
Start with Live predictions, then the API reference for authentication, endpoints, and integration patterns.