๐ 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
| Setting | Value |
|---|---|
| API Origin | https://api.tokenreply.com |
| SDK Base URL | https://api.tokenreply.com/v1 |
| Raw HTTP endpoint example | https://api.tokenreply.com/v1/chat/completions |
| Auth Header | Authorization: Bearer sk-xxx |
| Content-Type | application/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-hereTokens 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/generationsand more
โฑ๏ธ Rate Limit Headers
API responses may include rate limit headers:
| Header | Description |
|---|---|
x-ratelimit-limit-requests | Maximum requests allowed in the current window |
x-ratelimit-remaining-requests | Remaining requests in the current window |
x-ratelimit-reset-requests | Time 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
- Using API Key: basic integration and first request
- Compatibility: see supported endpoints and clients
- Models & Rules: learn about available models
- Code Examples: full code examples
