DOKUMENTASI DEVELOPER ZIBYTE GATEWAY

Panduan Integrasi API, Editor & Ekosistem AI

Dokumentasi lengkap menyambungkan Base URL https://api.zibyte.biz.id/v1 ke berbagai SDK, IDE coding agent, dan platform otomasi workflow.

1. Standar Endpoint & Autentikasi

Zibyte menggunakan satu API Key berawalan zb-live-.... Gunakan salah satu endpoint sesuai ekosistem aplikasi Anda:

OPENAI / CURSOR / CLINE / OPENCODE
Base URL: https://api.zibyte.biz.id/v1
Chat: POST /v1/chat/completions
Models: GET /v1/models
Image Gen: POST /v1/images/generations
Cek Kuota: GET /v1/quota
ANTHROPIC / CLAUDE CODE CLI
Origin URL: https://api.zibyte.biz.id
Messages: POST /v1/messages
Header: x-api-key: zb-live-...
Version: anthropic-version: 2023-06-01

2. Panduan Kompatibilitas Universal (16 Platform)

Pilih platform di bawah ini untuk melihat langkah setup spesifik beserta potongan kode siap pakai.

VS Code
OpenAI Compatible (/v1) · REKOMENDASI MODEL: glm-5.2 atau auto

VS Code

Ambil API Key

Gunakan model AI di dalam Visual Studio Code lewat ekstensi Continue, GitHub Copilot BYOK, atau konfigurasi OpenAI-compatible langsung di settings.

1Buka Dashboard Zibyte lalu buat API Key baru (format zb-live-...).
2Di VS Code, pasang ekstensi AI coding favorit (misal Continue, Cline, atau Copilot Custom Model).
3Buka file konfigurasi (~/.continue/config.yaml atau settings.json VS Code).
4Masukkan apiBase https://api.zibyte.biz.id/v1, tempel API Key Anda, dan pilih model auto atau glm-5.2.
~/.continue/config.yaml (VS Code)
name: Zibyte VS Code Config
version: 1.0.0
schema: v1
models:
  - name: Zibyte Auto Router
    provider: openai
    model: auto
    apiBase: https://api.zibyte.biz.id/v1
    apiKey: zb-live-ISI_API_KEY_ANDA
  - name: GLM-5.2 Coding
    provider: openai
    model: glm-5.2
    apiBase: https://api.zibyte.biz.id/v1
    apiKey: zb-live-ISI_API_KEY_ANDA

Rumus Pemotongan Saldo Presisi

1. Rasio baku: 1.000.000 Effective Token = Rp 1.000 (Rp 0,001 / effective token).
2. Setiap request dihitung presisi 1:1 sesuai pemakaian aktual model: round(total_tokens × multiplier) tanpa tambahan base token per request.
3. Mendukung penuh /v1/chat/completions, /v1/messages, /v1/responses, dan SSE stream: true; jika saldo tidak mencukupi mengembalikan HTTP 402.

Header Kompensasi Error

Setiap kali terjadi error jaringan/model (502/503/504), response menyertakan header X-Zibyte-Compensated: true yang menjamin Rp 0 Saldo Utama terpotong.