Anthropic Compatibility API
GoingMerry supports translating incoming Anthropic SDK message payloads to local API formats. This is designed to support developer tools (like Claude Code and OpenClaw) that call the Anthropic Messages API natively.
- Base Endpoint:
http://localhost:11434/v1 - Supported Endpoint:
POST /v1/messages
Request Mapping
GoingMerry translates parameters from the Anthropic format:
max_tokensis mapped to local token limits.systemprompts are set as global system parameters.- Chat arrays are converted into standard role-based formats.
curl Example
curl http://localhost:11434/v1/messages \
-H "Content-Type: application/json" \
-H "x-api-key: merry" \
-H "anthropic-version: 2023-06-01" \
-d '{
"model": "gemma4",
"max_tokens": 1024,
"messages": [
{"role": "user", "content": "Hello Claude!"}
]
}'
Response Payload
{
"id": "msg_01ab32f910a",
"type": "message",
"role": "assistant",
"model": "gemma4",
"content": [
{
"type": "text",
"text": "Hello! I am GoingMerry, running gemma4 locally."
}
],
"stop_reason": "end_turn",
"stop_sequence": null,
"usage": {
"input_tokens": 10,
"output_tokens": 12
}
}