API Overview
The Vexrail API provides an OpenAI-compatible interface for AI chat completions, model listing, promotion search, and conversation management. Publishers use this API to integrate Vexrail into their AI applications.
Base URL
https://api.vexrail.com/v1
All API endpoints are prefixed with /v1.
Authentication
The API uses key-based authentication. Every request must include two custom headers:
| Header | Description |
|---|---|
x-publishable-key | Your publishable key (pk_live_...). Identifies your project. |
x-secret-key | Your secret key (sk_live_...). Authenticates the request. |
See Authentication for details on obtaining and using API keys.
Request Format
- All request bodies must be JSON (
Content-Type: application/json). - All responses are JSON, except streaming responses which use Server-Sent Events (SSE).
Available Endpoints
| Endpoint | Method | Description |
|---|---|---|
/v1/chat/completions | POST | Create a chat completion (streaming or non-streaming) |
/v1/models | GET | List available LLM models |
OpenAI Compatibility
The chat completions and models endpoints follow the OpenAI API specification. This means you can use any OpenAI-compatible SDK (OpenAI, LangChain, Vercel AI SDK, etc.) with Vexrail by changing the base URL and adding authentication headers.
Rate Limits
The API does not currently enforce strict rate limits. However, we reserve the right to throttle requests that appear abusive or excessive. If you anticipate high-volume usage, contact us to discuss your needs.
Versioning
The API is currently at version 1 (/v1). We will communicate any breaking changes in advance through the blog and documentation updates.