curl --request PUT \
--url https://testnet.edel-api.xyz/v1/accounts/{accountId}/agents/{deploymentId}/model \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"modelId": "edel-tlm-chat",
"fallbackModelId": null,
"acceptThirdParty": false
}
'import requests
url = "https://testnet.edel-api.xyz/v1/accounts/{accountId}/agents/{deploymentId}/model"
payload = {
"modelId": "edel-tlm-chat",
"fallbackModelId": None,
"acceptThirdParty": False
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({modelId: 'edel-tlm-chat', fallbackModelId: null, acceptThirdParty: false})
};
fetch('https://testnet.edel-api.xyz/v1/accounts/{accountId}/agents/{deploymentId}/model', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://testnet.edel-api.xyz/v1/accounts/{accountId}/agents/{deploymentId}/model",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'modelId' => 'edel-tlm-chat',
'fallbackModelId' => null,
'acceptThirdParty' => false
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://testnet.edel-api.xyz/v1/accounts/{accountId}/agents/{deploymentId}/model"
payload := strings.NewReader("{\n \"modelId\": \"edel-tlm-chat\",\n \"fallbackModelId\": null,\n \"acceptThirdParty\": false\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://testnet.edel-api.xyz/v1/accounts/{accountId}/agents/{deploymentId}/model")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"modelId\": \"edel-tlm-chat\",\n \"fallbackModelId\": null,\n \"acceptThirdParty\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://testnet.edel-api.xyz/v1/accounts/{accountId}/agents/{deploymentId}/model")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"modelId\": \"edel-tlm-chat\",\n \"fallbackModelId\": null,\n \"acceptThirdParty\": false\n}"
response = http.request(request)
puts response.read_body{
"deployment": {
"deploymentId": "<string>",
"ownerAccountId": "<string>",
"strategySource": "strategy_lab",
"strategyVersion": "<string>",
"marketId": "<string>",
"mode": "paper",
"state": "pending",
"stateVersion": 123,
"parameters": {
"orderSizeAtoms": "<string>",
"timeframe": "1m",
"historyBars": 300
},
"createdAtEpochMs": 123,
"updatedAtEpochMs": 123,
"modelId": "<string>",
"fallbackModelId": "<string>"
}
}{
"version": "external-rest-error/v1",
"requestId": "<string>",
"code": "invalid_request",
"safeMessage": "<string>",
"retryable": true,
"recoveryActions": [
"none"
],
"occurredAtEpochMs": 1,
"realtimeTicketFailure": "invalid",
"apiKeyRejection": "malformed",
"agentRefusal": "agents_not_admitted_in_environment",
"rejectionGuard": "amount_atoms_invalid",
"withdrawalFailure": "requested",
"dependency": "dfns"
}{
"version": "external-rest-error/v1",
"requestId": "<string>",
"code": "invalid_request",
"safeMessage": "<string>",
"retryable": true,
"recoveryActions": [
"none"
],
"occurredAtEpochMs": 1,
"realtimeTicketFailure": "invalid",
"apiKeyRejection": "malformed",
"agentRefusal": "agents_not_admitted_in_environment",
"rejectionGuard": "amount_atoms_invalid",
"withdrawalFailure": "requested",
"dependency": "dfns"
}{
"version": "external-rest-error/v1",
"requestId": "<string>",
"code": "invalid_request",
"safeMessage": "<string>",
"retryable": true,
"recoveryActions": [
"none"
],
"occurredAtEpochMs": 1,
"realtimeTicketFailure": "invalid",
"apiKeyRejection": "malformed",
"agentRefusal": "agents_not_admitted_in_environment",
"rejectionGuard": "amount_atoms_invalid",
"withdrawalFailure": "requested",
"dependency": "dfns"
}{
"version": "external-rest-error/v1",
"requestId": "<string>",
"code": "invalid_request",
"safeMessage": "<string>",
"retryable": true,
"recoveryActions": [
"none"
],
"occurredAtEpochMs": 1,
"realtimeTicketFailure": "invalid",
"apiKeyRejection": "malformed",
"agentRefusal": "agents_not_admitted_in_environment",
"rejectionGuard": "amount_atoms_invalid",
"withdrawalFailure": "requested",
"dependency": "dfns"
}{
"version": "external-rest-error/v1",
"requestId": "<string>",
"code": "invalid_request",
"safeMessage": "<string>",
"retryable": true,
"recoveryActions": [
"none"
],
"occurredAtEpochMs": 1,
"realtimeTicketFailure": "invalid",
"apiKeyRejection": "malformed",
"agentRefusal": "agents_not_admitted_in_environment",
"rejectionGuard": "amount_atoms_invalid",
"withdrawalFailure": "requested",
"dependency": "dfns"
}{
"version": "external-rest-error/v1",
"requestId": "<string>",
"code": "invalid_request",
"safeMessage": "<string>",
"retryable": true,
"recoveryActions": [
"none"
],
"occurredAtEpochMs": 1,
"realtimeTicketFailure": "invalid",
"apiKeyRejection": "malformed",
"agentRefusal": "agents_not_admitted_in_environment",
"rejectionGuard": "amount_atoms_invalid",
"withdrawalFailure": "requested",
"dependency": "dfns"
}{
"version": "external-rest-error/v1",
"requestId": "<string>",
"code": "invalid_request",
"safeMessage": "<string>",
"retryable": true,
"recoveryActions": [
"none"
],
"occurredAtEpochMs": 1,
"realtimeTicketFailure": "invalid",
"apiKeyRejection": "malformed",
"agentRefusal": "agents_not_admitted_in_environment",
"rejectionGuard": "amount_atoms_invalid",
"withdrawalFailure": "requested",
"dependency": "dfns"
}Choose an agent's model
Sets the model a pending, running or paused agent uses, from the venue’s model catalog, and an optional fallback that answers when the model fails; without a fallback a failed model stops that step safely and never switches to another model. modelId null returns the agent to the catalog’s default in-network model. A third_party model or fallback receives the agent’s text, so it needs acceptThirdParty true; otherwise the route answers 400 invalid_request with agentRefusal model_consent_required. A model the catalog does not hold, or one that cannot chat, answers 400 with agentRefusal model_not_admitted. Each change is recorded in the agent’s action log as model_selected. A draining or stopped agent answers 409 command_rejected. Requires the owner’s passkey session or an API key with the agents scope, which the owner grants with a passkey on the agent connect approval page. Available on TestNet and Development only.
Method and path: PUT /v1/accounts//agents//model
Authentication: DFNS trader bearer required.
Request schema: SetAgentModelRequest.
Response schema: AgentDeploymentResponse.
Error envelope: ExternalRestError (external-rest-error/v1).
curl --request PUT \
--url https://testnet.edel-api.xyz/v1/accounts/{accountId}/agents/{deploymentId}/model \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"modelId": "edel-tlm-chat",
"fallbackModelId": null,
"acceptThirdParty": false
}
'import requests
url = "https://testnet.edel-api.xyz/v1/accounts/{accountId}/agents/{deploymentId}/model"
payload = {
"modelId": "edel-tlm-chat",
"fallbackModelId": None,
"acceptThirdParty": False
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({modelId: 'edel-tlm-chat', fallbackModelId: null, acceptThirdParty: false})
};
fetch('https://testnet.edel-api.xyz/v1/accounts/{accountId}/agents/{deploymentId}/model', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://testnet.edel-api.xyz/v1/accounts/{accountId}/agents/{deploymentId}/model",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'modelId' => 'edel-tlm-chat',
'fallbackModelId' => null,
'acceptThirdParty' => false
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://testnet.edel-api.xyz/v1/accounts/{accountId}/agents/{deploymentId}/model"
payload := strings.NewReader("{\n \"modelId\": \"edel-tlm-chat\",\n \"fallbackModelId\": null,\n \"acceptThirdParty\": false\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://testnet.edel-api.xyz/v1/accounts/{accountId}/agents/{deploymentId}/model")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"modelId\": \"edel-tlm-chat\",\n \"fallbackModelId\": null,\n \"acceptThirdParty\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://testnet.edel-api.xyz/v1/accounts/{accountId}/agents/{deploymentId}/model")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"modelId\": \"edel-tlm-chat\",\n \"fallbackModelId\": null,\n \"acceptThirdParty\": false\n}"
response = http.request(request)
puts response.read_body{
"deployment": {
"deploymentId": "<string>",
"ownerAccountId": "<string>",
"strategySource": "strategy_lab",
"strategyVersion": "<string>",
"marketId": "<string>",
"mode": "paper",
"state": "pending",
"stateVersion": 123,
"parameters": {
"orderSizeAtoms": "<string>",
"timeframe": "1m",
"historyBars": 300
},
"createdAtEpochMs": 123,
"updatedAtEpochMs": 123,
"modelId": "<string>",
"fallbackModelId": "<string>"
}
}{
"version": "external-rest-error/v1",
"requestId": "<string>",
"code": "invalid_request",
"safeMessage": "<string>",
"retryable": true,
"recoveryActions": [
"none"
],
"occurredAtEpochMs": 1,
"realtimeTicketFailure": "invalid",
"apiKeyRejection": "malformed",
"agentRefusal": "agents_not_admitted_in_environment",
"rejectionGuard": "amount_atoms_invalid",
"withdrawalFailure": "requested",
"dependency": "dfns"
}{
"version": "external-rest-error/v1",
"requestId": "<string>",
"code": "invalid_request",
"safeMessage": "<string>",
"retryable": true,
"recoveryActions": [
"none"
],
"occurredAtEpochMs": 1,
"realtimeTicketFailure": "invalid",
"apiKeyRejection": "malformed",
"agentRefusal": "agents_not_admitted_in_environment",
"rejectionGuard": "amount_atoms_invalid",
"withdrawalFailure": "requested",
"dependency": "dfns"
}{
"version": "external-rest-error/v1",
"requestId": "<string>",
"code": "invalid_request",
"safeMessage": "<string>",
"retryable": true,
"recoveryActions": [
"none"
],
"occurredAtEpochMs": 1,
"realtimeTicketFailure": "invalid",
"apiKeyRejection": "malformed",
"agentRefusal": "agents_not_admitted_in_environment",
"rejectionGuard": "amount_atoms_invalid",
"withdrawalFailure": "requested",
"dependency": "dfns"
}{
"version": "external-rest-error/v1",
"requestId": "<string>",
"code": "invalid_request",
"safeMessage": "<string>",
"retryable": true,
"recoveryActions": [
"none"
],
"occurredAtEpochMs": 1,
"realtimeTicketFailure": "invalid",
"apiKeyRejection": "malformed",
"agentRefusal": "agents_not_admitted_in_environment",
"rejectionGuard": "amount_atoms_invalid",
"withdrawalFailure": "requested",
"dependency": "dfns"
}{
"version": "external-rest-error/v1",
"requestId": "<string>",
"code": "invalid_request",
"safeMessage": "<string>",
"retryable": true,
"recoveryActions": [
"none"
],
"occurredAtEpochMs": 1,
"realtimeTicketFailure": "invalid",
"apiKeyRejection": "malformed",
"agentRefusal": "agents_not_admitted_in_environment",
"rejectionGuard": "amount_atoms_invalid",
"withdrawalFailure": "requested",
"dependency": "dfns"
}{
"version": "external-rest-error/v1",
"requestId": "<string>",
"code": "invalid_request",
"safeMessage": "<string>",
"retryable": true,
"recoveryActions": [
"none"
],
"occurredAtEpochMs": 1,
"realtimeTicketFailure": "invalid",
"apiKeyRejection": "malformed",
"agentRefusal": "agents_not_admitted_in_environment",
"rejectionGuard": "amount_atoms_invalid",
"withdrawalFailure": "requested",
"dependency": "dfns"
}{
"version": "external-rest-error/v1",
"requestId": "<string>",
"code": "invalid_request",
"safeMessage": "<string>",
"retryable": true,
"recoveryActions": [
"none"
],
"occurredAtEpochMs": 1,
"realtimeTicketFailure": "invalid",
"apiKeyRejection": "malformed",
"agentRefusal": "agents_not_admitted_in_environment",
"rejectionGuard": "amount_atoms_invalid",
"withdrawalFailure": "requested",
"dependency": "dfns"
}Authorizations
The authorization field takes the session bearer returned by sign-in, or an API key where the route allows keys. Paste the token itself into the authorization field.
Path Parameters
11 - 64Body
A model id from the venue's model catalog that can chat, or null for the default in-network model.
^[a-z0-9][a-z0-9._-]{0,63}$The one model that answers when modelId fails, or null to stop safely instead. Requires modelId and differs from it.
^[a-z0-9][a-z0-9._-]{0,63}$true accepts that a third_party model (or fallback) receives this agent's text. Without it a third_party choice answers 400.
Response
Success
Show child attributes
Show child attributes