https://api.tikway.ai. One Tikway API key works across supported protocols. The request path selects the incoming protocol; the model ID selects the model.
Choose an endpoint
Use HTTPS. Set
Content-Type: application/json for JSON requests. For file uploads, follow the endpoint’s multipart/form-data specification. In Gemini requests, {model} is part of the path; other APIs usually take model in the JSON body. Use an available model ID from your Tikway model list.
Tikway’s native Anthropic and Gemini paths are
/v1/messages and /v1beta/models/.... Do not append /anthropic or /gemini to the gateway URL.Create and store an API key
Sign in to the Tikway console to create an API key. Store it in a server-side environment variable such asTIKWAY_API_KEY. Do not put it in browser code, mobile app bundles, repositories, or logs. Revoke and replace an exposed key.
The examples below use a shell environment variable. Set TIKWAY_API_KEY first and replace each example model with one available to your account.
Pass the key for each protocol
The gateway also accepts
X-API-Key. For new integrations, use the protocol-native header shown above so your requests match the SDKs and API Reference. Send Gemini keys in the request header.
OpenAI-compatible example
base_url to https://api.tikway.ai/v1 and api_key to your Tikway key. The SDK adds the Bearer header.
Anthropic Messages example
Native Gemini example
Troubleshoot authentication
The gateway returns401 when it cannot identify or validate the key. It may return 403 when a valid key lacks access to a resource. Check the URL, the complete key, the header for your protocol, and access to the target model.
The x-request-id response header identifies a request for support and debugging. See Status codes and responses for error bodies, rate limit headers, and retries.
