Is Yelu compatible with the OpenAI API?
Is Yelu compatible with the OpenAI API?
Yes. Use the OpenAI-compatible base URL
https://api.yelu.ai/v1, provide a Yelu API key, and call supported endpoints with OpenAI request shapes. Model-specific capabilities can differ, so discover models and test the features you rely on.Can I use the official OpenAI SDK?
Can I use the official OpenAI SDK?
Yes. Set
base_url in Python, baseURL in JavaScript, or option.WithBaseURL in Go. See the SDK guides.Which model names are available?
Which model names are available?
Availability is specific to your account. Call
GET /v1/models and use a returned id; do not assume every provider model is enabled.Should I use Chat Completions or Responses?
Should I use Chat Completions or Responses?
Use Responses for new agentic workflows that benefit from typed output items, tools, reasoning controls, or continuation with
previous_response_id. Use Chat Completions when you need the broadest compatibility with existing OpenAI clients and message-based applications.How do I keep an API key safe?
How do I keep an API key safe?
Store it in a server-side secret manager or environment variable. Never ship it in browser code, mobile apps, desktop binaries, public repositories, or client-visible logs. Use separate keys per environment and rotate exposed keys immediately.
Why does a model reject vision, tools, or JSON schema?
Why does a model reject vision, tools, or JSON schema?
The endpoint can accept a field even when the selected model or routed provider does not support that capability. Select a compatible model, simplify the request, or use a documented fallback. Test capability-critical requests before production rollout.
What should I retry?
What should I retry?
Retry
429 and temporary 5xx failures with exponential backoff, jitter, and a small retry budget. Do not retry 400, 401, 403, or 404 unchanged. See Errors and Rate limits.Does streaming reduce cost?
Does streaming reduce cost?
Not inherently. Streaming improves time to first token and user experience, but generated tokens remain billable. A disconnected stream can also have usage before the client sees the final event.
Can I send requests from a browser?
Can I send requests from a browser?
Do not expose a long-lived Yelu key to browsers. Send the user request to your own authenticated backend, enforce authorization and budgets there, and have the backend call Yelu.
How do I report a reproducible API issue?
How do I report a reproducible API issue?
Record the endpoint, model, timestamp with timezone, HTTP status, error
type and code, and a sanitized minimal request. Remove API keys, personal data, prompts, files, and tool secrets before sharing diagnostics through your Yelu support channel.