API
Dokumentasi
MecutinAI adalah gateway AI OpenAI-compatible. Beli token pass, dapat API key, langsung pakai. Semua model dari provider AI terdepan.
Quick Start
Base URL
https://mecutinai.com/api/v1
Autentikasi
Semua endpoint gateway memerlukan API key. Gunakan header Authorization dengan format Bearer. API key diawali dengan sk_.
Authorization: Bearer sk_aB3xK9pQxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Request Pertama Anda
curl -X POST https://mecutinai.com/api/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer sk_AKUN_ANDA" \
-d '{
"model": "qwen3.7-max",
"messages": [
{ "role": "user", "content": "Halo, apa kabar?" }
]
}'Model yang Tersedia
Semua model berasal dari provider AI terdepan. Katalog ini tetap — tidak berubah saat admin mengganti endpoint/key provider.
| Model ID | Nama | Tipe | Deskripsi |
|---|---|---|---|
| qwen3.7-max | Qwen 3.7 Max | Chat | Flagship — reasoning terkuat, 1M context |
| qwen3.7-plus | Qwen 3.7 Plus | Chat | Balance performa & kecepatan, 1M context |
| qwen3.8-max | Qwen 3.8 Max | Chat | Generasi terbaru — flagship reasoning |
| deepseek-v4-pro | DeepSeek V4 Pro | Chat | Reasoning model — deep thinking |
| deepseek-v4-flash | DeepSeek V4 Flash | Chat | Cepat & hemat untuk tugas ringan |
| deepseek-v4-flash-0731 | DeepSeek V4 Flash (0731) | Chat | Snapshot 31 Juli — versi tertentu |
| glm-5.1 | GLM 5.1 | Chat | Chat & function calling |
| glm-5.2 | GLM 5.2 | Chat | Generasi terbaru — chat & tools |
| kimi-k2.7-code | Kimi K2.7 Code | Chat | Spesialis coding & long context |
Chat Completions
/v1/chat/completionsMenghasilkan respons chat dari model. Mendukung streaming (SSE) dan non-streaming. Format request & response 100% OpenAI-compatible.
Parameter Body
| Field | Tipe | Wajib | Deskripsi |
|---|---|---|---|
| model | string | Ya | ID model (lihat tabel di atas) |
| messages | array | Ya | Array of { role, content } |
| stream | boolean | Tidak | Default false. true = SSE stream |
| temperature | number | Tidak | 0.0–2.0, default 1.0 |
| max_tokens | integer | Tidak | Maksimum token output |
| tools | array | Tidak | Function calling (model-dependent) |
Contoh — Non-Streaming (curl)
curl -X POST https://mecutinai.com/api/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer sk_AKUN_ANDA" \
-d '{
"model": "qwen3.7-max",
"messages": [
{ "role": "system", "content": "Kamu adalah asisten yang membantu." },
{ "role": "user", "content": "Jelaskan apa itu API gateway." }
],
"temperature": 0.7
}'Response (Non-Streaming)
{
"id": "chatcmpl-xxxxx",
"object": "chat.completion",
"model": "qwen3.7-max",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "API gateway adalah..."
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 25,
"completion_tokens": 150,
"total_tokens": 175
}
}Contoh — Streaming (SSE)
curl -X POST https://mecutinai.com/api/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer sk_AKUN_ANDA" \
-d '{
"model": "qwen3.7-plus",
"messages": [{ "role": "user", "content": "Halo!" }],
"stream": true
}'Response berupa Server-Sent Events. Setiap chunk berisi delta.content. Stream diakhiri dengan data: [DONE].
data: {"choices":[{"delta":{"role":"assistant","content":""},"index":0}]}
data: {"choices":[{"delta":{"content":"Halo"},"index":0}]}
data: {"choices":[{"delta":{"content":"! Ada"},"index":0}]}
data: {"choices":[],"usage":{"prompt_tokens":5,"completion_tokens":10,"total_tokens":15}}
data: [DONE]Contoh — JavaScript (fetch)
const res = await fetch('https://mecutinai.com/api/v1/chat/completions', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer sk_AKUN_ANDA',
},
body: JSON.stringify({
model: 'qwen3.7-max',
messages: [{ role: 'user', content: 'Halo!' }],
}),
});
const data = await res.json();
console.log(data.choices[0].message.content);Contoh — Python (openai SDK)
from openai import OpenAI
client = OpenAI(
api_key="sk_AKUN_ANDA",
base_url="https://mecutinai.com/api/v1",
)
response = client.chat.completions.create(
model="qwen3.7-max",
messages=[{"role": "user", "content": "Halo!"}],
)
print(response.choices[0].message.content)List Models
/v1/modelsMendapatkan daftar semua model yang tersedia. Format OpenAI-compatible.
curl https://mecutinai.com/api/v1/models \ -H "Authorization: Bearer sk_AKUN_ANDA"
{
"object": "list",
"data": [
{ "id": "qwen3.7-max", "object": "model", "created": 1754870400, "owned_by": "mecutinai" },
{ "id": "qwen3.7-plus", "object": "model", "created": 1754870400, "owned_by": "mecutinai" },
{ "id": "qwen3.8-max", "object": "model", "created": 1754870400, "owned_by": "mecutinai" },
{ "id": "deepseek-v4-pro", "object": "model", "created": 1754870400, "owned_by": "mecutinai" },
{ "id": "deepseek-v4-flash", "object": "model", "created": 1754870400, "owned_by": "mecutinai" },
{ "id": "glm-5.2", "object": "model", "created": 1754870400, "owned_by": "mecutinai" },
{ "id": "kimi-k2.7-code", "object": "model", "created": 1754870400, "owned_by": "mecutinai" },
...
]
}Embeddings
/v1/embeddingsEndpoint embeddings tersedia jika provider mendukung model embedding. Cek /v1/models untuk model yang tersedia.
curl -X POST https://mecutinai.com/api/v1/embeddings \
-H "Content-Type: application/json" \
-H "Authorization: Bearer sk_AKUN_ANDA" \
-d '{
"model": "text-embedding-v3",
"input": "Ini adalah teks yang akan di-embed"
}'{
"object": "list",
"data": [
{
"object": "embedding",
"index": 0,
"embedding": [0.0123, -0.0456, 0.0789, ...]
}
],
"model": "text-embedding-v3",
"usage": { "prompt_tokens": 8, "total_tokens": 8 }
}Usage
/v1/usageCek sisa kuota token, status plan, dan statistik pemakaian.
curl https://mecutinai.com/api/v1/usage \ -H "Authorization: Bearer sk_AKUN_ANDA"
Response (Plan Terbatas)
{
"plan": "HARIAN_10M",
"display_name": "10M Tokens (1 Hari)",
"unlimited": false,
"token_limit": 10000000,
"remaining_tokens": 8420000,
"used_tokens": 1580000,
"rpm_limit": 60,
"expires_at": "2026-08-12T14:30:00Z",
"time_remaining_hours": 18.5,
"usage": { "requests": 42, "prompt_tokens": 510000, "completion_tokens": 1070000, "total_tokens": 1580000 }
}Response (Plan Unlimited)
{
"plan": "HARIAN_UNLIMITED",
"display_name": "Unlimited Tokens (1 Hari)",
"unlimited": true,
"token_limit": null,
"remaining_tokens": null,
"used_tokens": 2500000,
"rpm_limit": 15,
"expires_at": "2026-08-12T14:30:00Z",
"time_remaining_hours": 18.5,
"usage": { "requests": 120, "prompt_tokens": 800000, "completion_tokens": 1700000, "total_tokens": 2500000 }
}Rate Limiting & Kuota
Setiap API key memiliki batas RPM (requests per minute) dan kuota token berdasarkan plan yang dibeli. Rate limit di-enforced per API key menggunakan sliding window 60 detik.
| Plan | Kuota Token | Durasi | RPM | Harga |
|---|---|---|---|---|
| 10M Tokens (1 Hari) | 10.000.000 | 24 jam | 60 | Rp5.000 |
| Unlimited (1 Hari) | Tanpa batas | 24 jam | 15 | Rp25.000 |
| 10M Tokens | 10.000.000 | Tanpa batas waktu | 60 | Rp20.000 |
Response Headers
| Header | Deskripsi |
|---|---|
| X-RateLimit-Remaining-Requests | Sisa request dalam window 60 detik |
| X-RateLimit-Remaining-Tokens | Sisa token (di-omit untuk plan unlimited) |
| X-Plan-Expires-At | Waktu kedaluwarsa plan (di-omit untuk usage-based) |
| X-MecutinAI-Model | Model yang dipakai pada request ini |
Kode Error
Semua error mengikuti format OpenAI.
{
"error": {
"message": "Deskripsi error",
"type": "error_type",
"code": "error_code"
}
}| HTTP | Type | Code | Trigger |
|---|---|---|---|
| 401 | authentication_error | invalid_api_key | API key salah/revoked |
| 403 | permission_error | plan_expired | Plan kedaluwarsa |
| 403 | permission_error | insufficient_quota | Kuota token habis |
| 429 | rate_limit_error | rate_limit_exceeded | RPM terlampaui |
| 400 | invalid_request_error | invalid_model | Model tidak ada di katalog |
| 400 | invalid_request_error | invalid_request | Body request invalid |
| 503 | service_unavailable | provider_not_configured | Provider belum dikonfigurasi |
| 502 | api_error | provider_error | Upstream provider error |
| 504 | api_error | provider_timeout | Upstream timeout (120s) |
SDK Compatibility
MecutinAI 100% OpenAI-compatible. Ganti base_url dan api_key:
# Python
from openai import OpenAI
client = OpenAI(
api_key="sk_AKUN_ANDA",
base_url="https://mecutinai.com/api/v1",
)
# LangChain
from langchain_openai import ChatOpenAI
llm = ChatOpenAI(
openai_api_key="sk_AKUN_ANDA",
openai_api_base="https://mecutinai.com/api/v1",
model="qwen3.7-max",
)// JavaScript / TypeScript
import OpenAI from "openai";
const client = new OpenAI({
apiKey: "sk_AKUN_ANDA",
baseURL: "https://mecutinai.com/api/v1",
});IDE & CLI Integration
MecutinAI adalah OpenAI-compatible, jadi bisa dipakai di berbagai IDE dan CLI coding assistant. Cukup ganti Base URL dan API Key di pengaturan masing-masing tool.
Base URL: https://mecutinai.com/api/v1
API Key: sk_AKUN_ANDA (dapatkan di /pricing)
🤖 Claude CLI (Claude Code)
Claude CLI mendukung custom OpenAI-compatible endpoint via environment variable.
# Set environment variables export ANTHROPIC_BASE_URL="https://mecutinai.com/api" export ANTHROPIC_API_KEY="sk_AKUN_ANDA" # Jalankan Claude CLI claude
Catatan: Base URL tidak perlu trailing /v1 — Claude CLI menambahkan path secara internal.
🖥 Cursor IDE
Cursor mendukung override OpenAI Base URL untuk model OpenAI-compatible.
- 1. Buka Settings → Models
- 2. Expand API Keys section
- 3. Toggle ON Override OpenAI Base URL
- 4. Masukkan Base URL:
https://mecutinai.com/api/v1 - 5. Masukkan API Key:
sk_AKUN_ANDA
Mode Ask dan Plan bekerja dengan custom base URL. Agent mode memerlukan model yang support tool calling.
📝 Cline (VS Code Extension)
Cline support OpenAI-compatible provider dengan custom Base URL.
- 1. Buka VS Code → Ctrl+Shift+P → Cline: Open Settings
- 2. API Provider: pilih OpenAI Compatible
- 3. Base URL:
https://mecutinai.com/api/v1 - 4. API Key:
sk_AKUN_ANDA - 5. Model: pilih model dari katalog (mis.
deepseek-v4-flash)
⚡ Continue.dev (VS Code / JetBrains)
Continue.dev support custom OpenAI-compatible provider via config.json.
{
"models": [
{
"title": "MecutinAI DeepSeek",
"provider": "openai",
"model": "deepseek-v4-flash",
"apiBase": "https://mecutinai.com/api/v1",
"apiKey": "sk_AKUN_ANDA"
}
]
}🦀 Zed Editor
Zed support OpenAI-compatible endpoint via settings.json.
{
"language_models": {
"openai": {
"api_url": "https://mecutinai.com/api/v1",
"available_models": [
{
"name": "deepseek-v4-flash",
"display_name": "DeepSeek V4 Flash",
"max_tokens": 128000
}
]
}
}
}Set API key via keyring: zed: open keychain → tambah key untuk OpenAI.
🧑💻 Aider (CLI Coding Assistant)
Aider support custom OpenAI-compatible endpoint via flag atau config file.
# Via command line flags aider \ --openai-api-base "https://mecutinai.com/api/v1" \ --model deepseek-v4-flash \ --no-verify-ssl # Atau via ~/.aider.conf.yml # openai-api-base: https://mecutinai.com/api/v1 # openai-api-key: sk_AKUN_ANDA # model: deepseek-v4-flash
🔀 OpenRouter / 9Router
MecutinAI juga bisa dipakai sebagai upstream provider di OpenRouter atau router serupa. Gunakan endpoint OpenAI-compatible standar.
# Environment variables
export OPENAI_BASE_URL="https://mecutinai.com/api/v1"
export OPENAI_API_KEY="sk_AKUN_ANDA"
# Test dengan curl
curl https://mecutinai.com/api/v1/chat/completions \
-H "Authorization: Bearer $OPENAI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "deepseek-v4-flash",
"messages": [{"role": "user", "content": "Hello!"}]
}'🪿 Hermes / Custom Agent
Untuk agent framework custom (Hermes, dll), set OpenAI client dengan Base URL MecutinAI.
from openai import OpenAI
client = OpenAI(
api_key="sk_AKUN_ANDA",
base_url="https://mecutinai.com/api/v1",
)
response = client.chat.completions.create(
model="deepseek-v4-flash",
messages=[{"role": "user", "content": "Write a hello world in Python"}],
stream=True,
)
for chunk in response:
print(chunk.choices[0].delta.content or "", end="")Cara Mendapatkan API Key
- 1Kunjungi halaman /pricing dan pilih plan.
- 2Klik Beli Sekarang — Anda akan diarahkan ke halaman checkout.
- 3Scan QRIS dengan e-wallet atau mobile banking. Bayar sesuai nominal (termasuk kode unik).
- 4Tunggu admin mengonfirmasi pembayaran. Halaman order akan auto-refresh setiap 5 detik.
- 5Setelah dikonfirmasi, API key muncul di halaman order. Simpan baik-baik — key ditampilkan sekali saja.
- 6Pakai key tersebut untuk semua request ke /api/v1/*.
Cek sisa kuota: panggil GET /api/v1/usage dengan key Anda, atau lihat header X-RateLimit-Remaining-Tokens di setiap response gateway.