Quickstart
Send your first API request in 5 minutes
Prerequisites
Create an API Key
- aLog in to Dashboard, go to Console → LLM → My API Keys
- bClick Create New Key, set a name (e.g. "dev-key", "production")
- cCopy the key sk-xxxxxxxxxxxx and store it in a safe place
Subscribe to a Model from Marketplace
- aOpen the key detail drawer → "Subscriptions" tab
- bClick Subscribe More Models → browse and select a model (e.g. GPT-4o, Claude Sonnet)
- cView pricing and rating, then click "Use Now"
Save Endpoint URL
Send Your First Request
curl
curl -X POST https://api.arzastore.com/v1/chat/completions -H "Authorization: Bearer sk-your-api-key" -H "Content-Type: application/json" -d '{
"model": "gpt-4o",
"messages": [
{"role": "system", "content": "Bạn là trợ lý AI hữu ích."},
{"role": "user", "content": "Xin chào! Giới thiệu về bạn."}
],
"max_tokens": 1024
}'
Python (OpenAI SDK)
from openai import OpenAI
client = OpenAI(
api_key="sk-your-api-key",
base_url="https://api.arzastore.com/v1"
)
response = client.chat.completions.create(
model="gpt-4o",
messages=[
{"role": "system", "content": "Bạn là trợ lý AI hữu ích."},
{"role": "user", "content": "Xin chào! Giới thiệu về bạn."}
],
max_tokens=1024
)
print(response.choices[0].message.content)
Node.js (OpenAI SDK)
import OpenAI from "openai";
const client = new OpenAI({
apiKey: "sk-your-api-key",
baseURL: "https://api.arzastore.com/v1",
});
const response = await client.chat.completions.create({
model: "gpt-4o",
messages: [
{ role: "system", content: "Bạn là trợ lý AI hữu ích." },
{ role: "user", content: "Xin chào! Giới thiệu về bạn." }
],
max_tokens: 1024,
});
console.log(response.choices[0].message.content);
Streaming (Optional)
Add stream: true to receive response in chunks, for faster display to end users.
Python Streaming
from openai import OpenAI
client = OpenAI(
api_key="sk-your-api-key",
base_url="https://api.arzastore.com/v1"
)
stream = client.chat.completions.create(
model="gpt-4o",
messages=[
{"role": "user", "content": "Viết một bài thơ ngắn về Việt Nam"}
],
stream=True
)
for chunk in stream:
if chunk.choices[0].delta.content:
print(chunk.choices[0].delta.content, end="", flush=True)
Node.js Streaming
import OpenAI from "openai";
const client = new OpenAI({
apiKey: "sk-your-api-key",
baseURL: "https://api.arzastore.com/v1",
});
const stream = await client.chat.completions.create({
model: "gpt-4o",
messages: [
{ role: "user", content: "Viết một bài thơ ngắn về Việt Nam" }
],
stream: true,
});
for await (const chunk of stream) {
const content = chunk.choices[0]?.delta?.content || "";
process.stdout.write(content);
}
Choose the Right Model
| Task | Recommended Model | Reason |
|---|---|---|
| Simple chat, Q&A | gpt-4o-mini, claude-haiku-4.5 | Fast, cheap, good enough |
| Coding, debugging | claude-sonnet-4.6, gpt-4.1 | Strong at code, balanced speed/quality |
| Complex analysis | claude-opus-4.6, o3 | Highest quality, strong reasoning |
| Long documents | gemini-2.5-pro | Very large context window |