ExosAIGet your API key

An OpenAI-compatible API for many models

Keep the code you already have. Point the official OpenAI SDK, or any tool that speaks the OpenAI API, at ExosAI and switch between supported models by changing one string.

Switch in two lines

Set the base URL to https://api.exosai.tech/v1 and use your ExosAI API key. Everything else stays the same: chat completions, streaming, system prompts and message history.

from openai import OpenAI

client = OpenAI(base_url="https://api.exosai.tech/v1", api_key="YOUR_EXOSAI_KEY")
reply = client.chat.completions.create(
    model="MODEL_ID_FROM_THE_CATALOG",
    messages=[{"role": "user", "content": "Hello!"}],
)
print(reply.choices[0].message.content)

Node.js and curl

import OpenAI from "openai";

const client = new OpenAI({ baseURL: "https://api.exosai.tech/v1", apiKey: process.env.EXOSAI_API_KEY });
const reply = await client.chat.completions.create({
  model: "MODEL_ID_FROM_THE_CATALOG",
  messages: [{ role: "user", content: "Hello!" }],
});
console.log(reply.choices[0].message.content);
curl https://api.exosai.tech/v1/chat/completions \
  -H "Authorization: Bearer $EXOSAI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model": "MODEL_ID_FROM_THE_CATALOG", "messages": [{"role": "user", "content": "Hello!"}]}'

What you get

Questions

Do I need a new SDK?

No. Use the official OpenAI SDK for Python, Node.js or any other language and change the base URL and API key.

Which models are available?

The live catalog at exosai.tech/models lists every model you can use right now, with its exact ID and price.

Does streaming work?

Yes. Set stream to true and read the reply as it arrives, exactly like with the OpenAI API.

More