Getting started
API overview
Call AlphaProxy's models from your own software through an OpenAI-compatible API.
The AlphaProxy API lets your own software use the models your plan gives you, through the same endpoints and request format as the OpenAI API. Point an existing OpenAI client at AlphaProxy and change the key.
Base URL
https://alphaproxy.ai/api/v1
Endpoints
| Method | Path | Does |
|---|---|---|
GET |
/models |
Lists the models your key can use. |
POST |
/chat/completions |
Generates a reply, streamed or in one piece. |
Quick example
curl https://alphaproxy.ai/api/v1/chat/completions \
-H "Authorization: Bearer $ALPHAPROXY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "MODEL_ID",
"messages": [{"role": "user", "content": "Say hello in one sentence."}]
}'
from openai import OpenAI
client = OpenAI(base_url="https://alphaproxy.ai/api/v1", api_key="sk_...")
reply = client.chat.completions.create(
model="MODEL_ID",
messages=[{"role": "user", "content": "Say hello in one sentence."}],
)
print(reply.choices[0].message.content)
import OpenAI from "openai";
const client = new OpenAI({ baseURL: "https://alphaproxy.ai/api/v1", apiKey: process.env.ALPHAPROXY_API_KEY });
const reply = await client.chat.completions.create({
model: "MODEL_ID",
messages: [{ role: "user", content: "Say hello in one sentence." }],
});
console.log(reply.choices[0].message.content);
Replace MODEL_ID with an id from GET /models.
Billing
Each request is metered on what the model used and charged in credits to the account that owns the key. Workspace keys charge the workspace. See Credits and plans.