Endpoints and authentication
Base URL
Section titled “Base URL”https://api.openpalmlab.comClients differ in what they expect here. Some want the URL up to /v1, others want only the domain and add the path themselves. The pages under “Client setup” give the exact value for each client.
OpenAI-compatible endpoints
Section titled “OpenAI-compatible endpoints”Authentication: Authorization: Bearer sk-xxxx
| Method | Path | Notes |
|---|---|---|
POST |
/v1/chat/completions |
Chat Completions, streaming supported with "stream": true |
POST |
/v1/responses |
Responses API |
POST |
/v1/responses/compact |
Responses context compaction |
POST |
/v1/completions |
Legacy text completions |
POST |
/v1/embeddings |
Embeddings |
POST |
/v1/images/generations |
Image generation |
POST |
/v1/images/edits |
Image editing |
POST |
/v1/audio/speech |
Text to speech |
POST |
/v1/audio/transcriptions |
Speech to text |
POST |
/v1/rerank |
Reranking |
POST |
/v1/moderations |
Moderation |
GET |
/v1/models |
Models available to the current token |
An endpoint only works for a model if that model has an available channel in your group. The pricing page shows which endpoint types each model supports.
Anthropic-compatible endpoint
Section titled “Anthropic-compatible endpoint”| Method | Path | Notes |
|---|---|---|
POST |
/v1/messages |
Anthropic Messages API, streaming supported |
Either of these header styles works:
x-api-key: sk-xxxxanthropic-version: 2023-06-01Authorization: Bearer sk-xxxx/v1/messages/count_tokens is not available at the moment.
Gemini-compatible endpoints
Section titled “Gemini-compatible endpoints”| Method | Path | Notes |
|---|---|---|
POST |
/v1beta/models/{model}:generateContent |
Non-streaming generation |
POST |
/v1beta/models/{model}:streamGenerateContent |
Streaming generation |
GET |
/v1beta/models |
List models |
Send the key in an x-goog-api-key: sk-xxxx header, or as a ?key=sk-xxxx query parameter. Query parameters end up in proxy and server access logs, so the header is the better choice.
Authentication summary
Section titled “Authentication summary”| Header | Works with |
|---|---|
Authorization: Bearer sk-xxxx |
All endpoints |
x-api-key: sk-xxxx |
/v1/messages, /v1/models |
x-goog-api-key: sk-xxxx or ?key=sk-xxxx |
/v1beta/models/... |
The sk- prefix is optional; the token is accepted with or without it.
Request IDs
Section titled “Request IDs”When a request fails, the message field usually ends with (request id: ...). Include that ID when you contact support so we can find the request.