orientx

Quick Start

Make your first orientx API call in a few minutes

orientx puts many models behind a single OpenAI-compatible endpoint. If you already have code written against the OpenAI API, you can point it at orientx by changing two things: the base URL and the API key.

Base URLhttps://api.orientx.ai/v1
AuthAuthorization: Bearer <ORIENTX_API_KEY>
FormatOpenAI Chat Completions

Placeholders in this guide

<MODEL_ID> stands for a model you pick from listing models. Links written as #TODO-... are not wired up yet.

Send your first request

Create an API key

Open the console and create a key. Copy it immediately — the full value is shown only once.

Store it as an environment variable

Keep the key out of your source tree so it never reaches version control.

export ORIENTX_API_KEY="sk-..."

Call the API

curl https://api.orientx.ai/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $ORIENTX_API_KEY" \
  -d '{
    "model": "<MODEL_ID>",
    "messages": [
      { "role": "user", "content": "In one sentence, what is an API gateway?" }
    ]
  }'

A successful call returns the standard Chat Completions shape:

{
  "id": "chatcmpl-...",
  "object": "chat.completion",
  "model": "<MODEL_ID>",
  "choices": [
    {
      "index": 0,
      "finish_reason": "stop",
      "message": {
        "role": "assistant",
        "content": "An API gateway is a single entry point that routes and manages requests to backend services."
      }
    }
  ],
  "usage": { "prompt_tokens": 18, "completion_tokens": 21, "total_tokens": 39 }
}

Use the OpenAI SDKs

Because the API follows the OpenAI schema, the official SDKs work unchanged. Set base_url and api_key, and the rest of your code stays the same. Step-by-step: OpenAI SDK.

pip install openai

The same two fields unlock IDEs and apps — Codex, Cursor, Continue, Aider, Open WebUI, CrewAI, and others:

Stream responses

Set stream: true to receive tokens as they are generated instead of waiting for the full response. The stream is delivered as server-sent events and terminates with data: [DONE].

stream = client.chat.completions.create(
    model="<MODEL_ID>",
    messages=[{"role": "user", "content": "Write a haiku about latency."}],
    stream=True,
)

for chunk in stream:
    delta = chunk.choices[0].delta.content
    if delta:
        print(delta, end="", flush=True)

List available models

GET /v1/models returns every model your key can reach. Use the id field as the model value in your requests.

curl https://api.orientx.ai/v1/models \
  -H "Authorization: Bearer $ORIENTX_API_KEY"

Next steps

On this page