Skip to main content

Base URL and authentication

The URLs, headers and request formats of the TokenReply API.

Send your first request

Using API keys has the API URL and ready-to-run Python, Node.js and cURL examples.

Endpoints

SettingValue
API originhttps://api.tokenreply.com
SDK Base URLhttps://api.tokenreply.com/v1
Direct HTTP endpoint (example)https://api.tokenreply.com/v1/chat/completions
Authentication headerAuthorization: Bearer sk-xxx
Content-Typeapplication/json

Which URL to use

In an OpenAI SDK, base_url ends in /v1. For direct HTTP requests, use the full endpoint, such as /v1/chat/completions.

Authentication

Send your API key in this header with every request:

Authorization: Bearer sk-your-token-here

Get a key in API key management. Using API keys walks you through connecting.

Request and response formats

  • Requests and responses use JSON. File uploads use multipart, and audio comes back as binary
  • For streaming (SSE, Server-Sent Events), set "stream": true in the request body
  • Most apps use /v1/chat/completions
  • Also supported: /v1/responses, /v1/embeddings, /v1/images/generations and more

Rate-limit headers

Responses can include these rate-limit headers:

HeaderDescription
x-ratelimit-limit-requestsRequests allowed in the current window
x-ratelimit-remaining-requestsRequests left in the current window
x-ratelimit-reset-requestsTime until the window resets

Next steps