MarkasAI API documentation
The MarkasAI API is compatible with OpenAI and Anthropic. Apps, SDKs, and AI tools that already support either format only need the MarkasAI base URL and a MarkasAI API key. Costs are deducted from a prepaid balance in Rupiah.
Base URL
Every endpoint lives under the address below. Use HTTPS and a JSON body (Content-Type: application/json).
https://api.markas.ai.id/v1
OpenAI-format SDKs and tools use the base URL with /v1. Anthropic-format SDKs and tools use https://api.markas.ai.id without /v1, because they append /v1/messages themselves.
Available endpoints
| Method | Path | Purpose |
|---|---|---|
POST | /v1/chat/completions | Chat, OpenAI format |
POST | /v1/messages | Chat, Anthropic format |
POST | /v1/responses | OpenAI Responses API (used by Codex CLI) |
POST | /v1/images/generations | Image generation |
POST | /v1/videos/generations | Video generation |
GET | /v1/models | Models the key may use, with prices |
GET | /healthz | Liveness check, no authentication |
Any other path returns 404 not_found. A wrong HTTP method returns 405 method_not_allowed.
What is supported and what is not
- OpenAI and Anthropic format chat, as JSON or SSE streaming.
- The Responses API (
/v1/responses), stateless:storeis forced tofalsewhen you leave it out. - Image generation (returned as base64) and video generation (returned as a URL), billed from the same balance.
- Features the model understands, such as tool calling and image input, are passed through as is. Availability depends on the model.
- Spend limits, per-minute limits, expiry, and allowed models, set per API key.
Not available yet: embeddings, audio, fine-tuning, batch, file uploads, and helper endpoints such as /v1/messages/count_tokens. Calling directly from a browser is also unsupported (no CORS): call from your server.
Next steps
- Quickstart: create a key and make your first call.
- Authentication: how to send the API key and per-key settings.
- Model listing: model IDs, context windows, and prices through the API.
- Errors: error codes and when to retry.