curl --request PATCH \
--url https://app.thinnest.ai/api/v1/byok/credentials/{kind} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "gpt-5.4-mini",
"refreshModels": true
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({model: 'gpt-5.4-mini', refreshModels: true})
};
fetch('https://app.thinnest.ai/api/v1/byok/credentials/{kind}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.thinnest.ai/api/v1/byok/credentials/{kind}"
payload = {
"model": "gpt-5.4-mini",
"refreshModels": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"kind": "llm",
"provider": "openai",
"label": "OpenAI",
"key": "…Qw7m",
"fields": {
"model": "gpt-5.4-mini"
},
"model": "gpt-5.4-mini",
"models": [
"gpt-5.5",
"gpt-5.4",
"gpt-5.4-mini",
"gpt-5.4-nano"
],
"verifiedAt": "2026-10-06T10:01:40.902Z",
"updatedAt": "2026-10-06T11:18:03.226Z"
}Update BYOK Key Model
Changes the model a stored key runs without sending the key again. model must be on the key’s models; for a model the provider launched after you added the key, send refreshModels: true — alone, or with the new model, which is then checked against the fresh list. While BYOK is on, a refreshed list that drops the chosen model is refused. Needs a full key.
curl --request PATCH \
--url https://app.thinnest.ai/api/v1/byok/credentials/{kind} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "gpt-5.4-mini",
"refreshModels": true
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({model: 'gpt-5.4-mini', refreshModels: true})
};
fetch('https://app.thinnest.ai/api/v1/byok/credentials/{kind}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.thinnest.ai/api/v1/byok/credentials/{kind}"
payload = {
"model": "gpt-5.4-mini",
"refreshModels": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"kind": "llm",
"provider": "openai",
"label": "OpenAI",
"key": "…Qw7m",
"fields": {
"model": "gpt-5.4-mini"
},
"model": "gpt-5.4-mini",
"models": [
"gpt-5.5",
"gpt-5.4",
"gpt-5.4-mini",
"gpt-5.4-nano"
],
"verifiedAt": "2026-10-06T10:01:40.902Z",
"updatedAt": "2026-10-06T11:18:03.226Z"
}Authorizations
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. Refused with 404 (Workspace not found.) when the id is unknown, is not one of your customers, or is not an org_… id; 410 when that customer was deleted (restore it with POST /customers/{id}/restore until it is erased); 403 when the key belongs to one customer workspace (it cannot act as another); 400 when your workspace is not a developer workspace. /customers/* and GET /customers/usage are your own workspace's and refuse the header with 400: call them without it.
"org_3fKq9TzQ1mN8vB2xR7cLpA"
Path Parameters
Body
Response
The key after the change, masked.
One of your own provider keys, masked.