What problem does it solve? Building a gateway that accepts requests from Claude Code requires matching the Anthropic HTTP contract exactly—paths, headers, body fields, error formats, and retry semantics—otherwise the client fails or retries unpredictably. This Skill provides the complete request-handling specification so you can implement a compatible server without reverse-engineering the protocol. ## Core Features & Use Cases - Endpoint Contract: Defines required endpoints including POST /v1/messages, /v1/messages/count_tokens, the Files API (upload, list, download), and GET /v1/models. - Header and Body Handling: Specifies how to parse Authorization, x-api-key, anthropic-version, anthropic-beta, and body fields like thinking, tools, tool_choice, betas, and context_management with lenient validation. - Error and Retry Semantics: Prescribes Anthropic-style error JSON and status codes (400, 401, 429, 529) so Claude Code applies correct retry behavior. - Use Case: You are building an OpenAI-compatible proxy that also needs to serve Claude Code clients; use this Skill to implement the /v1/messages endpoint with correct streaming/non-streaming branching and count_tokens support. ## Quick Start Implement the /v1/messages endpoint for my gateway following the Claude Code HTTP contract, including header parsing, body validation, and Anthropic-style error responses.