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).

Base URL
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

MethodPathPurpose
POST/v1/chat/completionsChat, OpenAI format
POST/v1/messagesChat, Anthropic format
POST/v1/responsesOpenAI Responses API (used by Codex CLI)
POST/v1/images/generationsImage generation
POST/v1/videos/generationsVideo generation
GET/v1/modelsModels the key may use, with prices
GET/healthzLiveness 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: store is forced to false when 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.