Quick Start

1. Create and store a key

Create a key in Settings → API Keys, then put it in your server environment:

export APORTO_API_KEY="your-api-key"
export APORTO_MODEL="full-model-id-from-the-catalog"

Use the exact model ID from Models & Pricing. Availability and endpoint compatibility can change, so examples use an environment variable instead of a hard-coded model.

2. Send a request

curl https://api.aporto.tech/v1/chat/completions \
  -H "Authorization: Bearer $APORTO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"'"$APORTO_MODEL"'","messages":[{"role":"user","content":"Reply in one sentence."}]}'

OpenAI Python SDK

pip install openai
import os
from openai import OpenAI

client = OpenAI(
    api_key=os.environ["APORTO_API_KEY"],
    base_url="https://api.aporto.tech/v1",
)

response = client.chat.completions.create(
    model=os.environ["APORTO_MODEL"],
    messages=[{"role": "user", "content": "Reply in one sentence."}],
)
print(response.choices[0].message.content)

OpenAI JavaScript SDK

npm install openai
import OpenAI from "openai";

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

const response = await client.chat.completions.create({
  model: process.env.APORTO_MODEL,
  messages: [{ role: "user", content: "Reply in one sentence." }],
});
console.log(response.choices[0].message.content);

Next