Thread model
curl --request PUT \
--url https://www.dench.com/api/v1/agent-config/model/threads/{threadId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"modelId": "string"
}
'const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({modelId: 'string'})
};
fetch('https://www.dench.com/api/v1/agent-config/model/threads/{threadId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://www.dench.com/api/v1/agent-config/model/threads/{threadId}"
payload = { "modelId": "string" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text){
"threadId": "th_abc123",
"modelOverride": "anthropic/claude-opus-4"
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"details": "<unknown>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"details": "<unknown>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"details": "<unknown>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"details": "<unknown>"
}
}agent-config
Thread model
Set a thread model override.
PUT
/
agent-config
/
model
/
threads
/
{threadId}
Thread model
curl --request PUT \
--url https://www.dench.com/api/v1/agent-config/model/threads/{threadId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"modelId": "string"
}
'const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({modelId: 'string'})
};
fetch('https://www.dench.com/api/v1/agent-config/model/threads/{threadId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://www.dench.com/api/v1/agent-config/model/threads/{threadId}"
payload = { "modelId": "string" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text){
"threadId": "th_abc123",
"modelOverride": "anthropic/claude-opus-4"
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"details": "<unknown>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"details": "<unknown>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"details": "<unknown>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"details": "<unknown>"
}
}Authorizations
DenchApiKeyAgentSession
Workspace-scoped Dench API key from workspace settings. This is the same key used by DENCH_API_KEY in sandboxes.
Path Parameters
Body
application/json
⌘I