AkashML

Documentation

Introduction
Claude Code
List models (Anthropic shape) GETAnthropic base health probe GETCreate a message (Anthropic shape) POST
Anthropic SDK
List models GET
Create chat completion POSTCreate completion POST
Platform
Parameter controlsPresetsInferences
Models
Settings
API ReferenceAnthropic

Anthropic base health probe

GET
/anthropic

Lightweight probe used by Claude Code when it first connects to the base URL. Always returns { status: "ok" }.

Response Body

application/json

curl -X GET "https://example.com/anthropic"
{
  "status": "ok"
}

List models (Anthropic shape) GET

Lists available models in the Anthropic API shape. Model IDs containing `/` are aliased with `--` (e.g., `anthropic/claude-3-5-sonnet` → `anthropic--claude-3-5-sonnet`) because Claude Code rejects slashed identifiers.

Create a message (Anthropic shape) POST

Anthropic-compatible Messages endpoint. Internally translates to the upstream OpenAI-compatible inference path. **Streaming.** When `stream: true` is set, the response content type switches to `text/event-stream` and Anthropic-shaped events are emitted. Event types: - `message_start` — message envelope with id, model, role, usage. - `content_block_start` — start of a content block (text, tool_use, thinking). - `content_block_delta` — incremental content (text delta, input_json_delta, thinking_delta). - `content_block_stop` — end of a content block. - `message_delta` — running stop_reason / usage updates. - `message_stop` — terminal event. - `ping` — keep-alive. - `error` — terminal error event (see error type mapping below). **Model ID aliasing.** Slashes in upstream model IDs are aliased with `--` — pass `anthropic--claude-3-5-sonnet` to target `anthropic/claude-3-5-sonnet`. **Error response shape.** All non-2xx responses use `{ type: "error", error: { type, message } }`. Status → `error.type` mapping: | Status | `error.type` | |--------|---------------| | `400` | `invalid_request_error` | | `401` | `authentication_error` | | `403` | `permission_error` | | `404` | `not_found_error` | | `413` | `request_too_large` | | `429` | `rate_limit_error` (response includes `Retry-After` header) | | `500` | `api_error` | | `503` / `529` | `overloaded_error` |