Interface and Capability Overview
CoreRouter doesn't have just one type of interface. Before integrating, first determine which protocol your client will call, then select the corresponding Base URL, Endpoint, and model capabilities.
Quick Decision
| What You Want to Do | Priority Use | Base URL | Is It Universal |
|---|---|---|---|
| Regular chat, multi-turn conversation, function calling, vision understanding | /v1/chat/completions | https://api.corerouter.cloud/v1 | Common universal entry |
| Legacy text completion | /v1/completions | https://api.corerouter.cloud/v1 | Only for legacy applications |
| Codex, Agent, Responses workflow | /v1/responses | https://api.corerouter.cloud/v1 | Conditional support, requires model with Responses capability |
| Agent standalone search | /v1/alpha/search | https://api.corerouter.cloud/v1 | Conditional support, requires search-compatible channel and model |
| Claude Code, Anthropic-style applications | /v1/messages | https://api.corerouter.cloud | Conditional support, requires client using Anthropic Messages format |
| Gemini-style applications | /v1beta/models/{model}:generateContent | https://api.corerouter.cloud | Conditional support, requires client using Gemini request format |
| Embeddings / RAG | /v1/embeddings | https://api.corerouter.cloud/v1 | Requires Embeddings model |
| Rerank / Reranking | /v1/rerank | https://api.corerouter.cloud/v1 | Requires Rerank model or channel |
| Moderations / Content moderation | /v1/moderations | https://api.corerouter.cloud/v1 | Requires moderation model or available default moderation model |
| Image generation and editing | /v1/images/generations, /v1/images/edits | https://api.corerouter.cloud/v1 | Requires image model |
| Speech recognition, translation, TTS | /v1/audio/... | https://api.corerouter.cloud/v1 | Requires audio or TTS model |
| Realtime WebSocket | /v1/realtime | wss://api.corerouter.cloud/v1/realtime | Conditional support, requires Realtime model |
| Video tasks | /v1/videos, /v1/video/generations | https://api.corerouter.cloud/v1 | Conditional support, requires video task model and task channel |
| Midjourney-style image tasks | /mj/submit/... | https://api.corerouter.cloud | Conditional support, requires corresponding image task channel |
| Generic asynchronous tasks | /v1/tasks/{key} | https://api.corerouter.cloud/v1 | Advanced interface, typically used by plugins or integrated clients |
Endpoint List
| Endpoint | Method | Request Format | Description |
|---|---|---|---|
/v1/models | GET | No body | Query models visible to current API Key. Results may be affected by user groups, Key restrictions, and billing configuration. |
/v1/models/{model} | GET | No body | Query single model. |
/v1beta/models | GET | No body | Gemini-style model list, returns Gemini-compatible models visible to current API Key. |
/v1beta/openai/models | GET | No body | OpenAI-style model list compatible path for Gemini scenarios. |
/v1/chat/completions | POST | OpenAI Chat Completions JSON | Most commonly used chat entry. |
/v1/completions | POST | OpenAI legacy Completions JSON | Legacy application compatibility entry, new applications prioritize Chat Completions. |
/v1/responses | POST | OpenAI Responses JSON | Commonly used by Agent / Codex, only Model IDs supporting Responses can be used. |
/v1/responses/{response_id} | GET | No body | Query background Responses result. |
/v1/responses/compact | POST | Responses compact request | Advanced capability, typically automatically called by Agent tools; requires channel support for compact capability. |
/v1/alpha/search | POST | Client native search JSON | Standalone search compatibility entry, only channels and models configured with corresponding search capability available. |
/v1/messages | POST | Anthropic Messages JSON | Used by Claude Code and Anthropic-style clients. |
/v1beta/models/{model}:generateContent | POST | Gemini JSON | Gemini-style generation interface. |
/v1beta/models/{model}:streamGenerateContent | POST | Gemini JSON | Gemini-style streaming interface. |
/v1beta/models/{model}:embedContent | POST | Gemini Embedding JSON | Gemini-style single vector interface. |
/v1beta/models/{model}:batchEmbedContents | POST | Gemini Embedding JSON | Gemini-style batch vector interface. |
/v1/embeddings | POST | OpenAI Embeddings JSON | Used for RAG and vector retrieval. |
/v1/rerank | POST | Rerank JSON | Rerank candidate documents by relevance. |
/v1/moderations | POST | OpenAI Moderations JSON | Content moderation. |
/v1/images/generations | POST | JSON | Image generation. |
/v1/images/edits | POST | multipart/form-data or JSON | Image editing. |
/v1/edits | POST | JSON | Legacy image editing compatibility path, prefer /v1/images/edits. |
/v1/audio/transcriptions | POST | multipart/form-data | Audio to text. |
/v1/audio/translations | POST | multipart/form-data | Audio translation to English or model's default target language. |
/v1/audio/speech | POST | JSON | Text to speech. |
/v1/realtime?model={model} | GET WebSocket | WebSocket event JSON | Real-time voice/text interaction, not regular HTTP interface. |
/v1/videos | POST | JSON or multipart/form-data | OpenAI-style video task submission. |
/v1/videos/{task_id} | GET | No body | OpenAI-style video task query. |
/v1/videos/{task_id}/content | GET / HEAD | No body | Get video task output, availability depends on task channel. |
/v1/video/generations | POST | JSON | Compatible video task submission path. |
/v1/video/generations/{task_id} | GET | No body | Compatible video task query path. |
/v1/videos/{video_id}/remix | POST | JSON | Regenerate based on existing video, requires channel support. |
/v1/tasks/{key} | POST | JSON or multipart/form-data | Generic task submission, key is task plugin or task type identifier. |
/v1/tasks/{task_id} | GET | No body | Generic task query. |
/v1/tasks/{task_id}/artifacts | GET | No body | Query task artifact list. |
/v1/tasks/{task_id}/artifacts/{artifact_key}/content | GET / HEAD | No body | Download or probe task artifact content. |
/mj/submit/imagine | POST | Midjourney-style JSON | Image task submission, prompt required. |
/mj/task/{id}/fetch | GET | No body | Query image task status and result. |
Don't Mix Request Formats
Different protocols have different JSON structures; can't just change URL without changing request body.
| Protocol | User Message Field |
|---|---|
| Chat Completions | messages: [{ "role": "user", "content": "..." }] |
| Responses | input: "..." or structured input array |
| Anthropic Messages | messages, max_tokens, tool fields use Anthropic format |
| Gemini | contents: [{ "parts": [{ "text": "..." }] }] |
| Embeddings | input: "..." or string array |
| Rerank | query and documents |
How to Diagnose Common Errors
| Phenomenon | Common Cause | Solution |
|---|---|---|
| Chat works, Responses doesn't | Current Model ID only supports Chat Completions | Switch to model marked as supporting Responses in console |
Client path shows /v1/v1 | Base URL and client auto-append path conflict | Change Base URL to root address or address with /v1, choose one |
/v1/models has results, calling model errors | Key can see model list, but target model permissions, channel, or capability don't match | Switch model or check Key restrictions and account groups |
messages is required | Chat Completions request body missing messages | Use Chat format, don't pass Responses' input |
input is required | Responses, Embeddings, or Moderations missing input | Add input per corresponding interface |
query is empty or documents is empty | Rerank request missing query or candidate documents | Add query and non-empty documents |
| Realtime directly using curl POST | Realtime is WebSocket, not HTTP JSON POST | Use WebSocket client to connect wss://.../v1/realtime?model=... |
| Standalone search returns unsupported | Current channel or model has no search compatibility capability | Switch to model supporting search, or use client-supported search tools in Responses workflow |
Recommended Integration Order
- Use
/v1/modelsto confirm API Key is available. - Use
/v1/chat/completionsto verify basic chat. - Verify target interface per actual scenario, e.g., Responses, Embeddings, Rerank, audio, or video.
- Then fill the same set of Base URL, API Key, and Model ID into SDK, client, or plugin.
Interfaces Not Recommended to Promise Support
The following OpenAI legacy or management interfaces are not universal relay call entries. Even if they appear in client functionality, don't promise availability by default:
| Interface Type | Description |
|---|---|
/v1/files | File upload, file content reading, and other file management interfaces are not general model call entries. |
/v1/fine-tunes | Legacy fine-tuning interface is not a regular integration capability. |
/v1/assistants, /v1/threads, /v1/runs | Assistants legacy resources and thread interfaces not opened as universal relay entries. |
/v1/batches, /v1/vector_stores | Batch processing and vector store management interfaces not opened as universal relay entries. |
POST /v1/messages/count_tokens | Anthropic token counting helper interface currently not a public integration capability. |
/v1/images/variations | Image variation interface not equivalent to image generation or editing, requires separate confirmation before integration. |
DELETE /v1/models/{model} | Model deletion belongs to official management interface semantics, not suitable as relay station user capability. |
If a client strongly depends on these interfaces, first confirm whether it allows disabling related functionality, or switch to clients that only depend on Chat Completions, Responses, Anthropic Messages, Gemini, Embeddings, Rerank, images, audio, video tasks — these documented interfaces.
