Documentation

Getting Started

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.

api

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

ACTIVE

Meta Llama 3.3 70B - powerful instruction-following model

Model ID
meta/llama-3.3-70b-instruct
Context 128,000 tokens

Llama 3.1 405B Instruct

ACTIVE

Meta largest open model, top-tier reasoning

Model ID
meta/llama-3.1-405b-instruct
Context 128,000 tokens

Nemotron 4 340B

ACTIVE

NVIDIA own model, optimized for synthetic data

Model ID
nvidia/nemotron-4-340b-instruct
Context 4,096 tokens

DeepSeek R1

ACTIVE

DeepSeek reasoning model with chain-of-thought

Model ID
deepseek-ai/deepseek-r1
Context 64,000 tokens

Qwen3 235B A22B

ACTIVE

Alibaba Qwen3 MoE model, excellent multilingual

Model ID
qwen/qwen3-235b-a22b
Context 32,768 tokens

Mistral Large 2

ACTIVE

Mistral flagship model, strong coding and reasoning

Model ID
mistralai/mistral-large-2-instruct
Context 128,000 tokens

Gemma 3 27B

ACTIVE

Google Gemma 3, efficient and capable

Model ID
google/gemma-3-27b-it
Context 128,000 tokens

Phi-4 Reasoning Plus

ACTIVE

Microsoft Phi-4 with enhanced reasoning

Model ID
microsoft/phi-4-reasoning-plus
Context 16,000 tokens

GLM-4 9B Chat

ACTIVE

Zhipu AI GLM-4, strong Chinese/English bilingual

Model ID
zhipuai/glm-4-9b-chat
Context 128,000 tokens

MiniMax Text 01

ACTIVE

MiniMax long context model, up to 1M tokens

Model ID
minimax/minimax-text-01
Context 1,000,000 tokens

Chat Completions

POST /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

Python Implementation
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

Code
Meaning
401
Invalid API Key
404
Model Not Found
429
Rate Limit Reached

Error Response Body

{
  "error": {
    "message": "Invalid API key provided",
    "type": "invalid_request_error",
    "param": null,
    "code": "invalid_api_key"
  }
}