Documentation
Ainul.id API
The Ainul.id API provides access to our state-of-the-art large language models. Our API is fully OpenAI-compatible, allowing seamless integration with existing tools.
Base API URL
https://ai.minihost.my.id/v1
Authentication
All API requests must include your API key in the Authorization HTTP header.
// Authenticate your request with a Bearer Token
curl https://ai.minihost.my.id/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $YOUR_API_KEY" \
-d '{
"model": "meta/llama-3.3-70b-instruct",
"messages": [{"role": "user", "content": "Hello!"}]
}'
Available Models
Llama 3.3 70B Instruct
ACTIVEMeta Llama 3.3 70B - powerful instruction-following model
meta/llama-3.3-70b-instruct
Llama 3.1 405B Instruct
ACTIVEMeta largest open model, top-tier reasoning
meta/llama-3.1-405b-instruct
Nemotron 4 340B
ACTIVENVIDIA own model, optimized for synthetic data
nvidia/nemotron-4-340b-instruct
DeepSeek R1
ACTIVEDeepSeek reasoning model with chain-of-thought
deepseek-ai/deepseek-r1
Qwen3 235B A22B
ACTIVEAlibaba Qwen3 MoE model, excellent multilingual
qwen/qwen3-235b-a22b
Mistral Large 2
ACTIVEMistral flagship model, strong coding and reasoning
mistralai/mistral-large-2-instruct
Gemma 3 27B
ACTIVEGoogle Gemma 3, efficient and capable
google/gemma-3-27b-it
Phi-4 Reasoning Plus
ACTIVEMicrosoft Phi-4 with enhanced reasoning
microsoft/phi-4-reasoning-plus
GLM-4 9B Chat
ACTIVEZhipu AI GLM-4, strong Chinese/English bilingual
zhipuai/glm-4-9b-chat
MiniMax Text 01
ACTIVEMiniMax long context model, up to 1M tokens
minimax/minimax-text-01
Chat Completions
/v1/chat/completions
| Parameter | Type | Req. | Description |
|---|---|---|---|
| model | string | YES | ID of the model to use (e.g., meta/llama-3.3-70b-instruct) |
| messages | array | YES | A list of messages comprising the conversation. |
| stream | boolean | NO | Enable Server-Sent Events for streaming. |
Streaming
import openai
client = openai.OpenAI(
base_url="https://ai.minihost.my.id/v1",
api_key="your-api-key"
)
stream = client.chat.completions.create(
model="meta/llama-3.3-70b-instruct",
messages=[{"role": "user", "content": "Explain quantum physics."}],
stream=True,
)
for chunk in stream:
if chunk.choices[0].delta.content is not None:
print(chunk.choices[0].delta.content, end="")
Errors
Common Error Codes
Error Response Body
{
"error": {
"message": "Invalid API key provided",
"type": "invalid_request_error",
"param": null,
"code": "invalid_api_key"
}
}