Skip to main content
For the complete documentation index for agents and LLMs, see llms.txt.

List Embedders and Rankers with the REST APIBeta

Beta
This is coming — this page describes a feature that's still being rolled out and may not be available to you yet.

Besides LLMs, deepset hosts embedders and rankers. List them programmatically to compare them or to add them to a pipeline.


About This Task​

Call the Get Workspace Models endpoint with the category query parameter set to EMBEDDER or RANKER:

GET /api/v2/workspaces/{workspace_id}/models

Without category, the endpoint lists LLMs only, so existing calls return the same results as before.

Prerequisites​

List the Models​

This request lists the embedders. To list the rankers, set category to RANKER. Replace <WORKSPACE_ID> with your workspace ID and <YOUR_API_KEY> with your Haystack Platform API key:

curl --request GET \
"https://api.cloud.deepset.ai/api/v2/workspaces/<WORKSPACE_ID>/models?category=EMBEDDER" \
--header "Authorization: Bearer <YOUR_API_KEY>"

Read the Response​

Embedders and rankers are always connected, because they don't need a provider credential. In addition to the usual model fields, each of them can carry these fields:

  • category: EMBEDDER or RANKER.
  • components: The pipeline components that run the model, with their type and init parameters as in pipeline YAML. An embedder has text_embedder and document_embedder, and a ranker has ranker. Use them to add the model to a pipeline.
  • stage: EXPERIMENTAL for a model that is still being tried out, or LEGACY for a model to move away from.
  • details: Properties to compare models on. A model only has the properties that are known for it:
    • embedding_dimension: The length of the vectors the embedder returns.
    • max_input_tokens: The longest input the model reads, in tokens.
    • modalities: The kinds of input the model accepts, for example text.
    • languages: The languages the model supports, as ISO 639-1 codes such as en or de, or multilingual for a model trained on about 100 languages.
    • mteb_score: The model's Retrieval score on the MTEB leaderboard, benchmark MTEB(Multilingual, v2), as a percentage. Higher is better.
    • mteb_url: The MTEB leaderboard view the score comes from.

LLM responses don't include these fields.