DEVELOPERS
The gateway speaks the OpenAI format. Existing clients work after changing the base URL and the key.
https://api.arlu.io/v1In build. The gateway opens at launch.
curl https://api.arlu.io/v1/chat/completions \
-H "Authorization: Bearer $ARLU_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "[provider/model]",
"messages": [{"role": "user", "content": "Hello"}]
}'from openai import OpenAI
client = OpenAI(
base_url="https://api.arlu.io/v1",
api_key=os.environ["ARLU_API_KEY"],
)
reply = client.chat.completions.create(
model="[provider/model]",
messages=[{"role": "user", "content": "Hello"}],
)import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://api.arlu.io/v1",
apiKey: process.env.ARLU_API_KEY,
});
const reply = await client.chat.completions.create({
model: "[provider/model]",
messages: [{ role: "user", content: "Hello" }],
});POST/v1/chat/completionsSend messages to a model.GET/v1/modelsList models and their credit price.GET[/v1/balance]Credits held and allowance left for your key.Every model the gateway serves, with its price in credits for each million tokens. One credit is one dollar.