Skip to content

Feature request: add OpenAI-compatible /v1/embedding and /v1/rerank endpoints #3641

Description

@Luckylos

Feature request

Please consider adding OpenAI-compatible endpoints for embeddings and reranking:

  • POST /v1/embedding (and ideally the common alias POST /v1/embeddings)
  • POST /v1/rerank

Motivation

CLIProxyAPI already acts as an API aggregation/proxy layer. Adding embedding and rerank endpoints would make it more useful for RAG, memory systems, search pipelines, and agent frameworks that need more than chat completions.

Available upstream resources

There are already practical upstream providers that can back these capabilities:

  • Google AI Studio / Gemini API provides embedding models, e.g. gemini-embedding-001.
  • SiliconFlow provides embedding and reranker models, including rerank resources such as Qwen rerank models.

Suggested behavior

  • Keep request/response schemas close to OpenAI-compatible conventions where possible.
  • Allow routing/configuration per provider/model, similar to existing chat model routing.
  • Return standard OpenAI-style error bodies for unsupported models, provider errors, or invalid input.
  • Support common RAG use cases: single string input, batch input, and deterministic error handling for provider limits.

Thanks for maintaining CLIProxyAPI. These endpoints would make it significantly easier to use the project as a unified backend for agents and knowledge/RAG workflows.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions