DocsGPT-6 Astra API usage and code examples

GPT-6 Astra API usage and code examples

Base URL, authentication, endpoints, and code examples for calling GPT-6 Astra (model ID: gpt-6-astra) through the API.

Model details

Model IDgpt-6-astra
ProviderOpenAI
TypeText
StatusAvailable
Context length1,050,000 tokens
Max output128,000 tokens
Processing regionGlobal
PricingSee the model page

Base URL and authentication

FormatBase URLKey header
OpenAIhttps://token.echohub.io/v1Authorization: Bearer
Anthropichttps://token.echohub.iox-api-key / Authorization: Bearer

Create an API key in the console and put it in the ECHO_API_KEY environment variable.

Endpoints

Method and pathWhat it does
POST /v1/chat/completionsGenerate a chat reply (Chat Completions API)
POST /v1/responsesGenerate a response (Responses API)
POST /v1/messagesGenerate a chat reply (Messages API)

Call examples

The same model ID works with both the OpenAI and Anthropic formats.

import os
from openai import OpenAI

client = OpenAI(
    base_url="https://token.echohub.io/v1",
    api_key=os.environ["ECHO_API_KEY"],
)

res = client.chat.completions.create(
    model="gpt-6-astra",
    messages=[{"role": "user", "content": "Hello"}],
)
print(res.choices[0].message.content)

Related docs