Getting started

Introduction

HematToken is an AI gateway in the cloud: one endpoint for 191+ providers, with auto-fallback, Token Saver, and per-request cost tracking. Any tool that can be pointed at a custom base URL — an SDK, a CLI, an IDE, an extension — works without a code change.

Base URL & supported formats

One gateway, 5 API formats. Use whichever suits your tool:

endpoint
OpenAI Chat Completions   https://api.hemattoken.id/v1/chat/completions
OpenAI Responses          https://api.hemattoken.id/v1/responses
Anthropic Messages        https://api.hemattoken.id/v1/messages
Google Generative AI      https://api.hemattoken.id/v1beta/models/{model}:generateContent
Ollama-compatible         https://api.hemattoken.id/api/chat

API key format

Every request uses a HematToken gateway key — not your provider's API key. Provider keys are stored encrypted (AES-256-GCM, envelope encryption) and are never sent to a client.

gateway key
ht-xxxxxxxxxxxxxxxx

Model ID format

Models are written provider/model. For the models we host ourselves the prefix is hemattoken — those are the ones paid from your balance, with no provider API key needed.

example model IDs
hemattoken/glm-5.2          # model kami, dibayar dari saldo
anthropic/claude-sonnet-4.5   # pakai API key kamu sendiri
openai/gpt-5.2
nama-combo-kamu               # combo dipanggil dengan NAMANYA, tanpa prefix
Note: A combo is called by exactly the name you gave it in the dashboard — no prefix of any kind. If the name is unknown, the gateway answers that it is neither a provider nor a combo.
Butuh gateway key?

Daftar, pilih model kami atau colokin key sendiri, dan buat key pertama dalam hitungan menit.

Try it free