Skip to content

Connect external tools to the Model API

Use the Model API to call the models available in a Yorvis workspace from another application. You need the workspace’s HTTPS base URL, an API key for that workspace and the exact model ID. An administrator can give you these values or grant access to configure them.

In Yorvis Admin, open Workspaces, select the workspace and open Models. An administrator assigns the model, enables Model API, then copies Base URL. Under API keys, choose Create API key, name the integration and choose its expiry. Copy the key from the one-time dialog into the tool’s secret store. If you lose it, revoke it and issue a replacement.

Tool setting Value
Provider or protocol OpenAI-compatible, with a custom base URL and support for Chat Completions.
Base URL The value copied from Yorvis, including /workspaces/<workspace-id>/v1. A tool that asks for a complete chat endpoint also needs /chat/completions at the end.
API key The workspace key. In a provider’s dedicated API-key field, enter just its value. For raw HTTP use Authorization: Bearer <key>.
Model An exact id returned by GET /models for this workspace. A deployed model’s Yorvis name can differ from its source repository.

The supported operations covered here are model listing and chat completions, including streaming. If a tool offers several API modes, choose Chat Completions. A workspace key authorizes external model use within its workspace. Give each integration its own named key so you can revoke its access independently.

Set YORVIS_BASE_URL to the copied base URL and load YORVIS_API_KEY from your secret store into your shell environment. List the models available to this credential:

Terminal window
printf 'Authorization: Bearer %s\n' "$YORVIS_API_KEY" |
curl --silent --show-error --fail-with-body --header @- "${YORVIS_BASE_URL%/}/models"

Copy a model ID from data[].id. Save the following as request.json, replacing example-model with that ID:

{
"model": "example-model",
"messages": [{"role": "user", "content": "Reply with one word: ready."}],
"max_tokens": 16
}
Terminal window
printf 'Authorization: Bearer %s\n' "$YORVIS_API_KEY" |
curl --silent --show-error --fail-with-body --header @- \
--header 'Content-Type: application/json' --data-binary @request.json \
"${YORVIS_BASE_URL%/}/chat/completions"

A successful response contains the reply in choices[0].message.content. To try streaming, add "stream": true to the request object and pass --no-buffer to curl.

  1. Create a request and set its method to GET. Paste the workspace base URL and append /models.
  2. Under Authorization, choose Bearer Token. Supply the workspace key through a local secret. Send the request and copy a model ID from the response.
  3. Create a POST request to the base URL plus /chat/completions, with the same authorization. Select Body → raw → JSON, paste the request object above and substitute the model ID. Select Send. Postman authorization · Postman request bodies
  • If authentication fails, check that the URL and key belong to the same workspace and that the key is still active.
  • If the model is missing, refresh GET /models and ask the workspace administrator to check its assignment. If the request path returns 404, check the workspace prefix and that /v1 occurs only once.
  • For HTTP 429, observe Retry-After when present and check the workspace quota. For HTTP 503, ask the administrator to check model readiness and serving capacity in the pool’s model status.