Skip to main content

Integration Overview

The Vexrail API is fully compatible with the OpenAI chat completions format. If your AI application already uses an OpenAI-compatible SDK, integration requires minimal changes -- you update the base URL and add authentication headers.

Base URL

https://api.vexrail.com/v1

Authentication Headers

Every API request requires two custom headers:

HeaderValue
x-publishable-keyYour publishable key (pk_live_...)
x-secret-keyYour secret key (sk_live_...)

Conversation Tracking

To maintain conversation context, include an additional header:

HeaderValue
x-conversation-idA unique identifier for the conversation session

The conversation ID groups messages into a single conversation thread. This is important for:

  • Contextual ad relevance (understanding the full conversation).
  • Conversation analytics in your dashboard.

Use a UUID or any unique string that persists across messages in the same conversation.

How It Works

  1. Your application sends a chat completion request to https://api.vexrail.com/v1/chat/completions.
  2. Vexrail forwards the request to the underlying LLM.
  3. If monetization is enabled, Vexrail may include contextual product recommendations in the response.
  4. The response is returned to your application in the standard OpenAI format.

Your application does not need to handle ad logic. Promotions are woven into the AI response naturally when relevant.

Supported SDKs

Vexrail works with any OpenAI-compatible SDK. We provide integration guides for:

Supported Features

FeatureSupported
Chat completionsYes
Streaming (SSE)Yes
Non-streaming (JSON)Yes
Model selectionYes
List modelsYes

Available Models

You can list available models by calling the models endpoint. The response follows the OpenAI models list format.

Next Steps

Choose your SDK and follow the integration guide: