← ClaudeAtlas

tokenlab-native-endpointslisted

Use TokenLab native endpoint families such as Responses, Anthropic Messages, Gemini generateContent, media, audio, embeddings, and translations when OpenAI-compatible chat is not the right contract.
hedging8563/tokenlab-skills · ★ 1 · AI & Automation · score 75
Install: claude install-skill hedging8563/tokenlab-skills
# TokenLab Native Endpoints Use this skill when a user needs provider-native behavior, non-chat APIs, or migration guidance beyond OpenAI-compatible `/v1/chat/completions`. ## What this skill should deliver - A clear endpoint choice and why it fits the request. - A minimal request example with the correct base URL and auth header. - A note on when OpenAI-compatible chat remains the simpler path. - A fail-closed contract check for non-chat or provider-native request shapes. - A recovery path when TokenLab returns a native endpoint hint or contract error. ## Endpoint families - OpenAI-compatible chat: `POST https://api.tokenlab.sh/v1/chat/completions` - OpenAI Responses: `POST https://api.tokenlab.sh/v1/responses` - Anthropic Messages: `POST https://api.tokenlab.sh/v1/messages` - Gemini native generate content: `POST https://api.tokenlab.sh/v1beta/models/{model}:generateContent` - Model catalog: `GET https://api.tokenlab.sh/v1/models` - Task-specific model shortlist: `GET https://api.tokenlab.sh/v1/models?recommended_for=<scene>` - Model contract: `GET https://api.tokenlab.sh/v1/models/:model` ## Preferred approach 1. Start with OpenAI-compatible chat unless the user needs a native contract, non-chat API, or provider-specific behavior. 2. If a previous response includes `X-TokenLab-Hint` or `X-TokenLab-Native-Endpoint`, treat it as routing evidence and prefer the exact native route in the header. 3. For Anthropic-style requests, use `/v1/messages` and preserve Anthropic