Skip to navigation
Model VaultStandard Vault

Calling a Standard Vault over the API

Once your Standard Vault is set up in the Model Vault app, use the Vault endpoint URL and model name shown in the model card (see Managing Vaults) in your API calls. You authenticate with your Cohere API key.

In every case you point the request directly at your vault endpoint instead of the default Cohere API base URL. The APIs a model accepts depend on whether it’s a Cohere model or a third-party open model:

ModelCohere SDK and Cohere API (/v2/*)OpenAI-compatible base URL
Cohere modelsYes<YOUR_VAULT_ENDPOINT_URL>/compatibility/v1
Open modelsNo<YOUR_VAULT_ENDPOINT_URL>/v1

Cohere models can be called three ways: the Cohere SDK, raw HTTP, or an OpenAI-compatible client. Open models only accept OpenAI-compatible requests; see Calling open models.

This page covers Standard Vaults, where clients connect directly to the vault endpoint. An Encrypted Vault uses the same request and response shapes, but traffic must go through an attestation-verifying client or proxy. See Calling an Encrypted Vault over the API.

Cohere SDK

Point the Cohere SDK at your vault endpoint with base_url:

PYTHON
import cohere
co = cohere.ClientV2(
api_key="<COHERE_API_KEY>",
base_url="<YOUR_VAULT_ENDPOINT_URL>",
)
response = co.chat(
model="<YOUR_VAULT_MODEL_NAME>",
messages=[{"role": "user", "content": "Hello from Model Vault!"}],
)
print(response.message.content[0].text)

Raw HTTP

If you don’t use the SDK, call the vault endpoint directly over HTTP. Send your API key as a bearer token and use the same request body as the Cohere API:

cURL
curl "<YOUR_VAULT_ENDPOINT_URL>/v2/chat" \
-H "Authorization: bearer <COHERE_API_KEY>" \
-H "Content-Type: application/json" \
-d '{
"model": "<YOUR_VAULT_MODEL_NAME>",
"messages": [{"role": "user", "content": "Hello from Model Vault!"}]
}'

OpenAI-compatible API

For existing OpenAI integrations, point an OpenAI-compatible client at your vault’s compatibility base URL (<YOUR_VAULT_ENDPOINT_URL>/compatibility/v1) and use your Cohere API key:

PYTHON
from openai import OpenAI
client = OpenAI(
api_key="<COHERE_API_KEY>",
base_url="<YOUR_VAULT_ENDPOINT_URL>/compatibility/v1",
)
response = client.chat.completions.create(
model="<YOUR_VAULT_MODEL_NAME>",
messages=[{"role": "user", "content": "Hello from Model Vault!"}],
)
print(response.choices[0].message.content)

Chat, Embed, and Rerank

The chat example above points the SDK at your vault. Embed and Rerank requests work the same way: keep the base_url pointed at your vault endpoint and call co.embed(...) or co.rerank(...) with your vault’s model name.

Calling open models

Third-party open models, such as DeepSeek, GLM, Gemma, GPT-OSS, and Qwen, are served through the OpenAI-compatible Chat Completions API at <YOUR_VAULT_ENDPOINT_URL>/v1. They don’t accept Cohere API (/v2/*) or /compatibility/v1 requests, so use an OpenAI-compatible client with your Cohere API key:

PYTHON
from openai import OpenAI
client = OpenAI(
api_key="<COHERE_API_KEY>",
base_url="<YOUR_VAULT_ENDPOINT_URL>/v1",
)
response = client.chat.completions.create(
model="deepseek-v4-1-flash",
messages=[{"role": "user", "content": "Hello from Model Vault!"}],
)
print(response.choices[0].message.content)

Or call the endpoint over HTTP:

cURL
curl "<YOUR_VAULT_ENDPOINT_URL>/v1/chat/completions" \
-H "Authorization: Bearer <COHERE_API_KEY>" \
-H "Content-Type: application/json" \
-d '{
"model": "deepseek-v4-1-flash",
"messages": [{"role": "user", "content": "Hello from Model Vault!"}]
}'

Set model to the model name shown on your vault’s model card. For the model names of every open model, see Supported Models.

Next steps