Skip to main content

Getting Started

Get from zero to your first API call in a few minutes.

1. Create an account and key​

Create an account in the Browser App and verify your email. Existing customers can sign in with email or Telegram. You can also use the Telegram Mini App.

Open Primex API Keys and create a key. Keys look like prx-xxxxxxxx… and spend from your account's shared AI balance. Keep it secret and treat it like a password.

Top up credits from Billing (see Billing & Credits).

2. Pick a base URL​

Primex speaks two request formats. Use whichever matches your tooling; both bill through the same prx- key.

FormatBase URL
OpenAI-compatiblehttps://gateway.primexos.com/v1
Anthropic-compatiblehttps://gateway.primexos.com

3. Make a request​

cURL​

curl https://gateway.primexos.com/v1/chat/completions \
-H "Authorization: Bearer prx-YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-5.5",
"messages": [{"role": "user", "content": "Say hello in one line."}]
}'

Python (OpenAI SDK)​

from openai import OpenAI

client = OpenAI(
base_url="https://gateway.primexos.com/v1",
api_key="prx-YOUR_KEY",
)

resp = client.chat.completions.create(
model="gpt-5.5",
messages=[{"role": "user", "content": "Say hello in one line."}],
)
print(resp.choices[0].message.content)

Node (OpenAI SDK)​

import OpenAI from "openai";

const client = new OpenAI({
baseURL: "https://gateway.primexos.com/v1",
apiKey: "prx-YOUR_KEY",
});

const resp = await client.chat.completions.create({
model: "gpt-5.5",
messages: [{ role: "user", content: "Say hello in one line." }],
});
console.log(resp.choices[0].message.content);

4. Use a Claude model (Anthropic format)​

Prefer Claude, or using the Anthropic SDK / Claude Code? Point at the base URL without /v1:

export ANTHROPIC_BASE_URL=https://gateway.primexos.com
export ANTHROPIC_API_KEY=prx-YOUR_KEY

See Client Setup → Claude Code for the full workflow.

Next steps​