Skip to main content

๐ŸŒ Base URL & Auth

This page keeps the low-level protocol reference: URL structure, auth headers, request format, and rate-limit headers. For first-time integration, start with "Using API Key".

๐Ÿš€ Start here first

If your goal is to get the API working right now, start with Using API Key. It already covers the shortest path with the API URL plus Python, Node.js, and cURL.

๐Ÿ“ก Endpoint Information

SettingValue
API Originhttps://api.tokenreply.com
SDK Base URLhttps://api.tokenreply.com/v1
Raw HTTP endpoint examplehttps://api.tokenreply.com/v1/chat/completions
Auth HeaderAuthorization: Bearer sk-xxx
Content-Typeapplication/json

๐Ÿ’ก Tip

With OpenAI SDKs, set base_url to an address ending in /v1. For direct HTTP requests, use the full endpoint such as /v1/chat/completions.

๐Ÿ” Authentication

All API requests must include the token in the HTTP header:

Authorization: Bearer sk-your-token-here

Tokens are created on the API Key Management page; the actual integration steps live in Using API Key.

๐Ÿ“„ Request & Response Conventions

  • Request and response bodies are JSON
  • Streaming uses SSE (Server-Sent Events). Set "stream": true
  • Recommended primary endpoint: /v1/chat/completions
  • Also supported: /v1/responses, /v1/embeddings, /v1/images/generations and more

โฑ๏ธ Rate Limit Headers

API responses may include rate limit headers:

HeaderDescription
x-ratelimit-limit-requestsMaximum requests allowed in the current window
x-ratelimit-remaining-requestsRemaining requests in the current window
x-ratelimit-reset-requestsTime until the window resets

๐Ÿงญ How this page differs from the others

  • Using API Key: for first-time integration, focused on the API URL and the shortest runnable examples
  • Code Examples: holds more variant-oriented snippets such as streaming and raw HTTP
  • Compatibility: describes which endpoints and clients are supported

๐Ÿ‘‰ Next Steps