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, such as embedding_dimension, max_input_tokens, modalities, languages, mteb_score, and mteb_url. A model only has the properties that are known for it.

LLM responses don't include these fields.