Swiss AI Research Platform
•
3 min read
API routes by backend

Which backend serves your request

The first part of the model id decides where a request goes:

Model id starts withBackend
CSCS-Inference/CSCS L1
RCP-AIaaS/EPFL RCP
SwissAI-Research/ or {username}/Slurm (OpenTela)

Route support

RouteCSCS L1EPFL RCPSlurm (OpenTela)
/v1/chat/completionsYesYesYes
/v1/completionsYesYesYes
/v1/responsesYesNoYes
/v1/audio/transcriptionsNoAudio modelsAudio models
/v1/audio/translationsNoNoAudio models
/v1/embeddingsNoEmbedding modelsEmbedding models
/v1/rerankNoReranker modelsReranker models
/v1/scoreNoNoReranker models
/v1/classifyNoNoClassifier models
/v1/tokenizeNoNoYes
/v1/detokenizeNoNoYes

“No” means the backend doesn’t serve that route. You get an error with the backend’s status code, usually a 404.

For Slurm models, the audio, embedding, rerank, score and classify routes only work if the model was launched for that task. See model-launch to launch one.

Transcribe an audio file

Audio routes take a file upload rather than JSON:

curl https://api.swissai.svc.cscs.ch/v1/audio/transcriptions \
  -H "Authorization: Bearer $SWISSAI_RESEARCH_API_KEY" \
  -F model=RCP-AIaaS/openai/whisper-large-v3 \
  -F file=@test.wav
{"text":" The quick brown fox jumps over the lazy dog.","usage":{"type":"duration","seconds":4.0}}

On EPFL RCP, response_format can be json or verbose_json.

How requests are forwarded

  • CSCS L1 and EPFL RCP: we send your request to the same path on the provider, so /v1/rerank goes to /v1/rerank. We replace your API key with the provider’s key and remove the prefix from the model id. These requests are rate limited.
  • Slurm (OpenTela): we send your request to the vLLM server running the model, with your own API key. The model id stays the same. /v1/tokenize, /v1/detokenize, /v1/classify, /v1/score and /v1/rerank go to the vLLM paths without /v1.

What we don’t forward

We only forward the routes in the table above. Other provider and vLLM routes can’t be reached through this API, including:

  • vLLM’s admin routes, such as sleep and wake, weight updates, cache resets and profiling
  • /pooling and /tokenizer_info
  • Cohere-style /v2/rerank and /v2/embed
  • /v1/load_lora_adapter and /v1/unload_lora_adapter