Getting started
Make your first request
Call the gateway directly with curl or the OpenAI SDK.
The gateway is OpenAI-compatible, so any OpenAI client works once you set the base URL and a VCodeX key.
curl
curl https://app.vcodex.ai/v1/chat/completions \
-H "Authorization: Bearer $VCODEX_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "vcodex/auto",
"messages": [{ "role": "user", "content": "ship it" }]
}'Python (OpenAI SDK)
from openai import OpenAI
client = OpenAI(
base_url="https://app.vcodex.ai/v1",
api_key="$VCODEX_KEY",
)
resp = client.chat.completions.create(
model="vcodex/auto",
messages=[{"role": "user", "content": "ship it"}],
stream=True,
)
for chunk in resp:
print(chunk.choices[0].delta.content or "", end="")TypeScript (OpenAI SDK)
import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://app.vcodex.ai/v1",
apiKey: process.env.VCODEX_KEY,
});
const resp = await client.chat.completions.create({
model: "vcodex/auto",
messages: [{ role: "user", content: "ship it" }],
});Model selection
Use vcodex/auto to let the gateway pick a tier, or pass a concrete model id
from GET /v1/models.