Skip to main content

Overview

In addition to our purpose-built code models, we host our set of preferred open-weight models for coding tasks. You can hit these models directly through our OpenAI-compatible API. For discounted reserve rates, reach out to info@relace.ai. All hosted models are served from https://models.relace.ai and authenticate with your regular Relace API key — no separate setup, and any OpenAI SDK works by pointing it at our base URL.

Prerequisites

1

List Available Models

The live up to date model catalog is available from the /models endpoint.
Each entry in the returned data array includes the model id, context_length, per-token pricing, and supported sampling parameters and features.
2

Call Chat Completions

Send requests to /v1/chat/completions with the model ID of your choice. The endpoint is OpenAI-compatible, so you can use the OpenAI SDK directly.
Tool calling, JSON mode, structured outputs, and the standard sampling parameters (temperature, top_p, stop, etc.) work as they do with any OpenAI-compatible provider.
3

Stream Responses

Set stream: true to receive tokens as they are generated. Token usage is always reported in the final chunk of the stream.

Usage

Hosted model usage is billed per token at the rates advertised in the catalog. Usage appears in your dashboard alongside your other Relace API usage.