Skip to main content

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:

HeaderDescription
x-publishable-keyYour publishable key (pk_live_...). Identifies your project.
x-secret-keyYour 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​

EndpointMethodDescription
/v1/chat/completionsPOSTCreate a chat completion (streaming or non-streaming)
/v1/modelsGETList 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.