LLM API

Referensi API

Complete documentation on endpoints, request/response format and error handling

Base URL & Authentication

https://api.arzastore.com/v1

Replace <endpoint> with the URL endpoint from your LLM API Keys page.

Authorization: Bearer sk-your-api-key
# Hoặc, cho SDK Anthropic:
x-api-key: sk-your-api-key

Use Authorization: Bearer for the OpenAI SDK, Gemini and most clients; x-api-key for the Anthropic SDK. Google's x-goog-api-key and ?key= are not accepted.

Content-Type: application/json

Endpoints

Text

Images

Audio

Video

Embeddings

Model listing

Error Handling

When an error occurs, the API returns JSON with an error field:

{
 "error": {
 "message": "Mô tả lỗi chi tiết",
 "type": "invalid_request_error",
 "code": "model_not_found"
 }
}

HTTP Status Codes

CodeTypeDescription
200OKOK - Request successful
400Bad RequestBad Request - Invalid request
401UnauthorizedUnauthorized - Invalid or missing API key
402Payment RequiredInsufficient balance
403ForbiddenForbidden - No permission to access this model
404Not FoundNot Found - Model does not exist
429Rate LimitedToo Many Requests - Rate limit exceeded
500/502/503Server ErrorServer-side error

Retry Strategy

# curl tự retry với --retry (chỉ áp dụng cho lỗi mạng và 5xx)
curl https://api.arzastore.com/v1/chat/completions  --retry 3 --retry-delay 1 --retry-all-errors  -H "Authorization: Bearer sk-your-api-key"  -H "Content-Type: application/json"  -d '{"model":"gpt-4o","messages":[{"role":"user","content":"hi"}]}'

Need more help?

Our support team is ready to assist you

$

Prices are shown in USD

Picked from your location (Chile). You can change it anytime from the language button in the top bar, or pick one below.