Quick Start

1. Get Your API Key

Log in to the AIone Console and create a new key on the API Keys page.

We recommend creating separate keys for each environment or use case to simplify access control, usage tracking, and troubleshooting.

2. Send Your First Request

AIone is fully compatible with the OpenAI Chat Completions API. Simply set base_url to https://api.portal.aiin1.ai/v1 and use the OpenAI SDK or any compatible client.

Streaming is recommended: For interactive use cases, always enable stream: true. This reduces time-to-first-token from 10+ seconds down to 2-3 seconds, significantly improving the user experience.

from openai import OpenAI
 
client = OpenAI(
    api_key="sk-nex-your-key-here",
    base_url="https://api.portal.aiin1.ai/v1",
)
 
stream = client.chat.completions.create(
    model="claude-sonnet-4-6",
    messages=[
        {"role": "user", "content": "Hello, please introduce yourself"}
    ],
    max_tokens=4096,
    stream=True,
)
 
for chunk in stream:
    content = chunk.choices[0].delta.content
    if content:
        print(content, end="", flush=True)
print()

Python (Non-Streaming)

from openai import OpenAI
 
client = OpenAI(
    api_key="sk-nex-your-key-here",
    base_url="https://api.portal.aiin1.ai/v1",
)
 
response = client.chat.completions.create(
    model="claude-sonnet-4-6",
    messages=[
        {"role": "user", "content": "Hello, please introduce yourself"}
    ],
    max_tokens=4096,
)
 
print(response.choices[0].message.content)
import OpenAI from 'openai';
 
const client = new OpenAI({
  apiKey: 'sk-nex-your-key-here',
  baseURL: 'https://api.portal.aiin1.ai/v1',
});
 
const stream = await client.chat.completions.create({
  model: 'claude-sonnet-4-6',
  messages: [
    { role: 'user', content: 'Hello, please introduce yourself' },
  ],
  max_tokens: 4096,
  stream: true,
});
 
for await (const chunk of stream) {
  const content = chunk.choices[0]?.delta?.content;
  if (content) process.stdout.write(content);
}
console.log();

cURL (Streaming)

curl https://api.portal.aiin1.ai/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer sk-nex-your-key-here" \
  -d '{
    "model": "claude-sonnet-4-6",
    "messages": [
      {"role": "user", "content": "Hello, please introduce yourself"}
    ],
    "max_tokens": 4096,
    "stream": true
  }'

3. Switch Models

All models are served through the unified v1/chat/completions endpoint. Simply change the model parameter to switch:

Model model Parameter Best For
Claude Sonnet 4.6 claude-sonnet-4-6 General-purpose; balanced speed and quality
Claude Opus 4.6 claude-opus-4-6 Strongest reasoning; complex tasks
Claude Sonnet 4.5 claude-sonnet-4-5-20250929 High-quality general reasoning and code
Claude Opus 4.5 claude-opus-4-5-20251101 Top-tier complex analysis
Claude Haiku 4.5 claude-haiku-4-5-20251001 Ultra-fast responses; high concurrency
Claude Sonnet 4 claude-sonnet-4-20250514 Stable release; broad compatibility
GPT-5.4 gpt-5.4 OpenAI's current flagship
GPT-5.2 gpt-5.2 High-quality general and coding tasks
GPT-5 gpt-5 Existing integration compatibility
GPT-5 Mini gpt-5-mini High concurrency; low latency
GPT-4.1 gpt-4.1 Code and complex instruction following
GPT-4o gpt-4o Multimodal and general tasks
Gemini 2.5 Pro gemini-2.5-pro Complex reasoning and long context
Gemini 2.5 Flash gemini-2.5-flash Speed-first scenarios
Gemini 2.5 Flash Lite gemini-2.5-flash-lite Lower cost; high concurrency

For the full model list, visit the Models & Pricing page in the console or query the /v1/models endpoint.

4. Try the Sandbox

After logging in, go to the Sandbox page to test any model directly in your browser -- no code required.