Skip to main content
Yelu AI API is an OpenAI-compatible gateway. Keep your existing OpenAI SDK and request shape, change the base URL, and access models from multiple providers through one API.

One API for production AI

Yelu normalizes authentication, routing, streaming, usage data, and errors across supported model providers. Model availability is tied to your account and can be discovered at runtime with GET /v1/models.

Make your first request

Send a chat request in a few minutes with curl, JavaScript, or Python.

Use the OpenAI SDK

Point the official SDK at https://api.yelu.ai/v1 and keep its typed API.

Explore the API

Review endpoints, fields, responses, errors, and runnable request examples.

Build robust integrations

Apply timeouts, retries, observability, model discovery, and safe key handling.

Coding agents

Use Claude Code

Configure Anthropic Messages routing on macOS, Windows, or WSL 2.

Use Codex CLI

Connect Codex to Yelu’s Responses API with a custom model provider.

Core capabilities

Text

Chat Completions and the Responses API with conversation context and reasoning controls.

Multimodal

Vision input, image generation, audio transcription, and multimodal responses.

Agentic

Function calling, tool choice, structured JSON, streaming, and multi-step workflows.

Base URL

All OpenAI-compatible endpoints use this base URL:
Keep API keys on a trusted server. Never expose a Yelu key in browser code, public repositories, mobile binaries, or client-side logs.

First request

Set your key once, then send a request. Replace the example model with an ID returned by GET /v1/models if it is not enabled for your account.

Where to go next

1

Create and protect a key

Follow Authentication and load the key from an environment variable or secret manager.
2

Discover models

Call List models instead of hard-coding a provider catalog.
3

Choose an API

Start new agentic workflows with Responses, or use Chat Completions for broad OpenAI compatibility.
4

Prepare for production

Last modified on July 13, 2026