Memakai LLM API
Guide to creating API keys, subscribing to models, and using the OpenAI-compatible LLM API
OpenAI-Compatible API
Create an API Key
Consumer API Key
An API key is your credential to call the LLM API. Each key can subscribe to multiple models.
- 01Log in and go to Console → LLM → My API Keys
- 02Click the Create New Key. button. Set a memorable name (e.g. "key-dev", "key-production")
- 03The key will be in the format sk-xxxxxxxxxxxx.Copy and store the key safely — you can only view it by clicking "Reveal"
Routing Strategy
Subscribe to a Model
Choose a model from the Marketplace
Each API key must subscribe to at least 1 model before it can be used.
- 01Open the key detail drawer → select the "Subscriptions" tab
- 02Click Subscribe More Models → browse the Marketplace and select a model
- 03View pricing Token or Per-Request, check the rating, then click "Use Now"
- 04(Optional) Set an Alias for the subscription — groups multiple models under a single name for routing
Call the API
Endpoint & Authentication
View the endpoint URL on the LLM Marketplace → "API Info" button. Use the API key in the header Authorization: Bearer sk-xxx.
curl — Chat Completions
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": "user", "content": "Xin chào!"}
],
"stream": false
}'
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", # hoặc model_id / alias bạn đã subscribe
messages=[
{"role": "user", "content": "Xin chào!"}
],
stream=True # hỗ trợ streaming
)
for chunk in response:
if chunk.choices[0].delta.content:
print(chunk.choices[0].delta.content, end="")
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", // hoặc model_id / alias bạn đã subscribe
messages: [
{ role: "user", content: "Xin chào!" }
],
stream: true,
});
for await (const chunk of response) {
process.stdout.write(chunk.choices[0]?.delta?.content || "");
}
Streaming
Use with Claude Code
Automatic Setup
ARZASTORE AI supports automatic Claude Code setup. Just run a single command in the terminal.
- 01Go to Console → LLM → API Keys, open the key detail drawer
- 02Select the "Claude Code" tab, choose your OS and map models for 3 tiers: Haiku, Sonnet, Opus
- 03Click "Get Setup Command" → copy the one-line command into your terminal
macOS / Linux
curl -sL "https://arzastore.com/api/v1/llm/setup-claudecode?key=sk-xxx&os=linux&haiku=model1&sonnet=model2&opus=model3&fable=model4" | sh
Windows (PowerShell)
irm "https://arzastore.com/api/v1/llm/setup-claudecode?key=sk-xxx&os=windows&haiku=model1&sonnet=model2&opus=model3&fable=model4" | iex
Manual Setup
Uninstall
To remove the ARZASTORE AI configuration from Claude Code, run one of the following commands:
macOS / Linux
curl -sL "https://arzastore.com/api/v1/llm/uninstall-claudecode?os=linux" | sh
Windows (PowerShell)
irm "https://arzastore.com/api/v1/llm/uninstall-claudecode?os=windows" | iex
After Uninstalling
Supported API Endpoints
Chat completion — compatible with OpenAI, Claude, Gemini
Text completion (legacy format)
Text embeddings for vector search, RAG
List all models you have subscribed to
💡 Tips for Effective Use
- •Use aliases to group multiple providers for the same model → automatic failover when one provider fails
- •Test your key before using in production: open drawer → "Test" tab → send a test message
- •Monitor costs via the "Model Statistics" tab in the key drawer
- •Ensure sufficient balance before using — each request deducts in real time
- •Rate models after use to help the community choose better options