curl --request GET \
--url https://app.thinnest.ai/api/v1/agents/{id}/byok-model \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.thinnest.ai/api/v1/agents/{id}/byok-model', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.thinnest.ai/api/v1/agents/{id}/byok-model"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"provider": {
"id": "openai",
"label": "OpenAI"
},
"model": "gpt-5.4-mini",
"workspaceModel": "gpt-5.4-nano",
"stale": null
}{
"error": "Send a valid API key as `Authorization: Bearer <key>`."
}{
"error": "That agent was not found."
}{
"error": "This workspace is not using its own keys (or that agent was not found)."
}{
"error": "Over 240 requests a minute. Slow down and retry."
}Get Agent BYOK Model
On a workspace that brings its own keys: the model this agent runs on your own LLM key. model is the agent’s own choice (null when it runs the key’s model), and stale names an earlier choice your key no longer reaches, which the key’s model answers in place of. Refused with 409 when the workspace is not using its own keys.
curl --request GET \
--url https://app.thinnest.ai/api/v1/agents/{id}/byok-model \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.thinnest.ai/api/v1/agents/{id}/byok-model', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.thinnest.ai/api/v1/agents/{id}/byok-model"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"provider": {
"id": "openai",
"label": "OpenAI"
},
"model": "gpt-5.4-mini",
"workspaceModel": "gpt-5.4-nano",
"stale": null
}{
"error": "Send a valid API key as `Authorization: Bearer <key>`."
}{
"error": "That agent was not found."
}{
"error": "This workspace is not using its own keys (or that agent was not found)."
}{
"error": "Over 240 requests a minute. Slow down and retry."
}Authorizations
Your API key (ta_live_…) from Settings → API keys, sent as Authorization: Bearer <key>. Keep it on a server: it can message every customer you have. A key is full, build or read-only; a request its level does not allow is refused with 403.
Headers
Developers only: the customer workspace this request acts in — its org_… id from POST /customers. Leave it out to act in your own workspace.
"org_3fKq9TzQ1mN8vB2xR7cLpA"
Path Parameters
The agent's id (ag_…), as List Agents returns it. Another workspace's agent is the same 404 as one that never existed.
Response
The agent's model on your LLM key.
One of your own providers.
Show child attributes
Show child attributes
This agent's own choice, or null when it runs the key's model.
The key's own model — what an agent with no choice runs.
An earlier choice the key no longer reaches; the key's model answers instead until you choose again.