Python quickstart
Pass openai/gpt-6-astra as the model identifier against the OneInfer OpenAI-compatible endpoint, with your JWT token in the Authorization header.
from openai import OpenAI
client = OpenAI(
base_url="https://api.oneinfer.ai/v1/ula",
api_key="JWT_TOKEN",
)
response = client.chat.completions.create(
model="openai/gpt-6-astra",
messages=[
{"role": "user", "content": "Summarise the launch announcement in three bullets."},
],
max_tokens=1024,
)
print(response.choices[0].message.content)TypeScript quickstart
import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://api.oneinfer.ai/v1/ula",
apiKey: "JWT_TOKEN",
});
const response = await client.chat.completions.create({
model: "openai/gpt-6-astra",
messages: [{ role: "user", content: "Refactor this module for clarity." }],
max_tokens: 2048,
});
console.log(response.choices[0].message.content);cURL quickstart
curl https://api.oneinfer.ai/v1/ula/chat/completions \
-H "Authorization: Bearer JWT_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"model": "openai/gpt-6-astra",
"messages": [{"role": "user", "content": "Explain prompt caching in 100 words."}],
"max_tokens": 1024,
"stream": false
}'Ready to test the workflow?
What is not supported
GPT-6: Astra is not fine-tunable, accepts text and image input only (no audio or video input), and returns text only (no image, audio, or video output).