~/aimux $ curl https://aimux.id/v1

API Reference

Endpoint kompatibel dengan OpenAI SDK. Redeem voucher untuk mendapat API key FS-…, lalu ganti base_url ke Aimux.

Base URL

https://aimux.id/v1

Autentikasi

Authorization: Bearer FS-xxxx

Key didapat dengan redeem voucher. Kuota & masa aktif melekat pada key.

Endpoints

GET/v1/models
POST/v1/chat/completions
POST/v1/messages
POST/v1/images/generations

Chat completion

curl https://aimux.id/v1/chat/completions \
  -H "Authorization: Bearer FS-xxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "am/qwen3.8-max",
    "messages": [{"role": "user", "content": "Halo"}]
  }'

Streaming

Set "stream": true untuk respons SSE. Disarankan untuk model reasoning yang lambat agar tak terputus timeout.

curl -N https://aimux.id/v1/chat/completions \
  -H "Authorization: Bearer FS-xxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "am/deepseek-v4-pro",
    "stream": true,
    "messages": [{"role": "user", "content": "Jelaskan singkat"}]
  }'

Images

Butuh voucher tipe image (kuota credits).

curl https://aimux.id/v1/images/generations \
  -H "Authorization: Bearer FS-xxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "am/flux-1-schnell",
    "prompt": "a fox in a forest"
  }'

OpenAI SDK (Python)

from openai import OpenAI

client = OpenAI(
    api_key="FS-xxxx",
    base_url="https://aimux.id/v1",
)

resp = client.chat.completions.create(
    model="am/qwen3.8-max",
    messages=[{"role": "user", "content": "Halo"}],
)
print(resp.choices[0].message.content)

Catatan

  • Voucher text hanya untuk model teks; image hanya untuk model gambar.
  • Bila voucher terikat grup, hanya model dalam grup itu yang bisa dipakai (cek /models).
  • Kuota tipe tokens dipotong berdasarkan token nyata (input + output).
  • Nama model memakai prefiks am/ (mis. am/qwen3.8-max).