Update model settings and rates
curl --request PATCH \
--url https://api.agentsfleet.net/v1/admin/models/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"metadata": {
"advanced": true,
"context_cap_tokens": 123,
"context_source_url": "<string>",
"context_verified_at": "2023-11-07T05:31:56Z",
"display_name": "<string>"
},
"prices": [
{
"cached_input_nanos_per_mtok": "<string>",
"conditions": "<string>",
"effective_from": "2023-11-07T05:31:56Z",
"input_nanos_per_mtok": "<string>",
"output_nanos_per_mtok": "<string>",
"prompt_tokens_above": 123,
"source_url": "<string>",
"verified_at": "2023-11-07T05:31:56Z",
"cache_write_1h_nanos_per_mtok": "<string>",
"cache_write_5m_nanos_per_mtok": "<string>",
"cache_write_nanos_per_mtok": "<string>",
"effective_until": "2023-11-07T05:31:56Z"
}
],
"decision": {
"enabled": true,
"prices": [
{
"cached_input_nanos_per_mtok": "<string>",
"conditions": "<string>",
"effective_from": "2023-11-07T05:31:56Z",
"input_nanos_per_mtok": "<string>",
"output_nanos_per_mtok": "<string>",
"prompt_tokens_above": 123,
"source_url": "<string>",
"verified_at": "2023-11-07T05:31:56Z",
"cache_write_1h_nanos_per_mtok": "<string>",
"cache_write_5m_nanos_per_mtok": "<string>",
"cache_write_nanos_per_mtok": "<string>",
"effective_until": "2023-11-07T05:31:56Z"
}
],
"profile": {
"accepted_models": [
"<string>"
],
"capabilities": {
"choice": true,
"noul": true,
"score": true
},
"endpoint": "<string>",
"evaluated_at": "2023-11-07T05:31:56Z",
"evaluation_digest": "<string>",
"evaluation_source_url": "<string>",
"goal": {
"continue_action": {
"confidence_bps": 5000,
"probability_bps": 5000
},
"questions_revision": "<string>",
"statement_min_bps": 5000,
"wait": {
"confidence_bps": 5000,
"probability_bps": 5000
}
},
"input_max_bytes": 2,
"revision": "<string>"
}
},
"inference": {
"base_url": "<string>",
"max_output_tokens": 1,
"dialect": "<string>"
}
}
'import requests
url = "https://api.agentsfleet.net/v1/admin/models/{id}"
payload = {
"metadata": {
"advanced": True,
"context_cap_tokens": 123,
"context_source_url": "<string>",
"context_verified_at": "2023-11-07T05:31:56Z",
"display_name": "<string>"
},
"prices": [
{
"cached_input_nanos_per_mtok": "<string>",
"conditions": "<string>",
"effective_from": "2023-11-07T05:31:56Z",
"input_nanos_per_mtok": "<string>",
"output_nanos_per_mtok": "<string>",
"prompt_tokens_above": 123,
"source_url": "<string>",
"verified_at": "2023-11-07T05:31:56Z",
"cache_write_1h_nanos_per_mtok": "<string>",
"cache_write_5m_nanos_per_mtok": "<string>",
"cache_write_nanos_per_mtok": "<string>",
"effective_until": "2023-11-07T05:31:56Z"
}
],
"decision": {
"enabled": True,
"prices": [
{
"cached_input_nanos_per_mtok": "<string>",
"conditions": "<string>",
"effective_from": "2023-11-07T05:31:56Z",
"input_nanos_per_mtok": "<string>",
"output_nanos_per_mtok": "<string>",
"prompt_tokens_above": 123,
"source_url": "<string>",
"verified_at": "2023-11-07T05:31:56Z",
"cache_write_1h_nanos_per_mtok": "<string>",
"cache_write_5m_nanos_per_mtok": "<string>",
"cache_write_nanos_per_mtok": "<string>",
"effective_until": "2023-11-07T05:31:56Z"
}
],
"profile": {
"accepted_models": ["<string>"],
"capabilities": {
"choice": True,
"noul": True,
"score": True
},
"endpoint": "<string>",
"evaluated_at": "2023-11-07T05:31:56Z",
"evaluation_digest": "<string>",
"evaluation_source_url": "<string>",
"goal": {
"continue_action": {
"confidence_bps": 5000,
"probability_bps": 5000
},
"questions_revision": "<string>",
"statement_min_bps": 5000,
"wait": {
"confidence_bps": 5000,
"probability_bps": 5000
}
},
"input_max_bytes": 2,
"revision": "<string>"
}
},
"inference": {
"base_url": "<string>",
"max_output_tokens": 1,
"dialect": "<string>"
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
metadata: {
advanced: true,
context_cap_tokens: 123,
context_source_url: '<string>',
context_verified_at: '2023-11-07T05:31:56Z',
display_name: '<string>'
},
prices: [
{
cached_input_nanos_per_mtok: '<string>',
conditions: '<string>',
effective_from: '2023-11-07T05:31:56Z',
input_nanos_per_mtok: '<string>',
output_nanos_per_mtok: '<string>',
prompt_tokens_above: 123,
source_url: '<string>',
verified_at: '2023-11-07T05:31:56Z',
cache_write_1h_nanos_per_mtok: '<string>',
cache_write_5m_nanos_per_mtok: '<string>',
cache_write_nanos_per_mtok: '<string>',
effective_until: '2023-11-07T05:31:56Z'
}
],
decision: {
enabled: true,
prices: [
{
cached_input_nanos_per_mtok: '<string>',
conditions: '<string>',
effective_from: '2023-11-07T05:31:56Z',
input_nanos_per_mtok: '<string>',
output_nanos_per_mtok: '<string>',
prompt_tokens_above: 123,
source_url: '<string>',
verified_at: '2023-11-07T05:31:56Z',
cache_write_1h_nanos_per_mtok: '<string>',
cache_write_5m_nanos_per_mtok: '<string>',
cache_write_nanos_per_mtok: '<string>',
effective_until: '2023-11-07T05:31:56Z'
}
],
profile: {
accepted_models: ['<string>'],
capabilities: {choice: true, noul: true, score: true},
endpoint: '<string>',
evaluated_at: '2023-11-07T05:31:56Z',
evaluation_digest: '<string>',
evaluation_source_url: '<string>',
goal: {
continue_action: {confidence_bps: 5000, probability_bps: 5000},
questions_revision: '<string>',
statement_min_bps: 5000,
wait: {confidence_bps: 5000, probability_bps: 5000}
},
input_max_bytes: 2,
revision: '<string>'
}
},
inference: {base_url: '<string>', max_output_tokens: 1, dialect: '<string>'}
})
};
fetch('https://api.agentsfleet.net/v1/admin/models/{id}', 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://api.agentsfleet.net/v1/admin/models/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'metadata' => [
'advanced' => true,
'context_cap_tokens' => 123,
'context_source_url' => '<string>',
'context_verified_at' => '2023-11-07T05:31:56Z',
'display_name' => '<string>'
],
'prices' => [
[
'cached_input_nanos_per_mtok' => '<string>',
'conditions' => '<string>',
'effective_from' => '2023-11-07T05:31:56Z',
'input_nanos_per_mtok' => '<string>',
'output_nanos_per_mtok' => '<string>',
'prompt_tokens_above' => 123,
'source_url' => '<string>',
'verified_at' => '2023-11-07T05:31:56Z',
'cache_write_1h_nanos_per_mtok' => '<string>',
'cache_write_5m_nanos_per_mtok' => '<string>',
'cache_write_nanos_per_mtok' => '<string>',
'effective_until' => '2023-11-07T05:31:56Z'
]
],
'decision' => [
'enabled' => true,
'prices' => [
[
'cached_input_nanos_per_mtok' => '<string>',
'conditions' => '<string>',
'effective_from' => '2023-11-07T05:31:56Z',
'input_nanos_per_mtok' => '<string>',
'output_nanos_per_mtok' => '<string>',
'prompt_tokens_above' => 123,
'source_url' => '<string>',
'verified_at' => '2023-11-07T05:31:56Z',
'cache_write_1h_nanos_per_mtok' => '<string>',
'cache_write_5m_nanos_per_mtok' => '<string>',
'cache_write_nanos_per_mtok' => '<string>',
'effective_until' => '2023-11-07T05:31:56Z'
]
],
'profile' => [
'accepted_models' => [
'<string>'
],
'capabilities' => [
'choice' => true,
'noul' => true,
'score' => true
],
'endpoint' => '<string>',
'evaluated_at' => '2023-11-07T05:31:56Z',
'evaluation_digest' => '<string>',
'evaluation_source_url' => '<string>',
'goal' => [
'continue_action' => [
'confidence_bps' => 5000,
'probability_bps' => 5000
],
'questions_revision' => '<string>',
'statement_min_bps' => 5000,
'wait' => [
'confidence_bps' => 5000,
'probability_bps' => 5000
]
],
'input_max_bytes' => 2,
'revision' => '<string>'
]
],
'inference' => [
'base_url' => '<string>',
'max_output_tokens' => 1,
'dialect' => '<string>'
]
]),
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://api.agentsfleet.net/v1/admin/models/{id}"
payload := strings.NewReader("{\n \"metadata\": {\n \"advanced\": true,\n \"context_cap_tokens\": 123,\n \"context_source_url\": \"<string>\",\n \"context_verified_at\": \"2023-11-07T05:31:56Z\",\n \"display_name\": \"<string>\"\n },\n \"prices\": [\n {\n \"cached_input_nanos_per_mtok\": \"<string>\",\n \"conditions\": \"<string>\",\n \"effective_from\": \"2023-11-07T05:31:56Z\",\n \"input_nanos_per_mtok\": \"<string>\",\n \"output_nanos_per_mtok\": \"<string>\",\n \"prompt_tokens_above\": 123,\n \"source_url\": \"<string>\",\n \"verified_at\": \"2023-11-07T05:31:56Z\",\n \"cache_write_1h_nanos_per_mtok\": \"<string>\",\n \"cache_write_5m_nanos_per_mtok\": \"<string>\",\n \"cache_write_nanos_per_mtok\": \"<string>\",\n \"effective_until\": \"2023-11-07T05:31:56Z\"\n }\n ],\n \"decision\": {\n \"enabled\": true,\n \"prices\": [\n {\n \"cached_input_nanos_per_mtok\": \"<string>\",\n \"conditions\": \"<string>\",\n \"effective_from\": \"2023-11-07T05:31:56Z\",\n \"input_nanos_per_mtok\": \"<string>\",\n \"output_nanos_per_mtok\": \"<string>\",\n \"prompt_tokens_above\": 123,\n \"source_url\": \"<string>\",\n \"verified_at\": \"2023-11-07T05:31:56Z\",\n \"cache_write_1h_nanos_per_mtok\": \"<string>\",\n \"cache_write_5m_nanos_per_mtok\": \"<string>\",\n \"cache_write_nanos_per_mtok\": \"<string>\",\n \"effective_until\": \"2023-11-07T05:31:56Z\"\n }\n ],\n \"profile\": {\n \"accepted_models\": [\n \"<string>\"\n ],\n \"capabilities\": {\n \"choice\": true,\n \"noul\": true,\n \"score\": true\n },\n \"endpoint\": \"<string>\",\n \"evaluated_at\": \"2023-11-07T05:31:56Z\",\n \"evaluation_digest\": \"<string>\",\n \"evaluation_source_url\": \"<string>\",\n \"goal\": {\n \"continue_action\": {\n \"confidence_bps\": 5000,\n \"probability_bps\": 5000\n },\n \"questions_revision\": \"<string>\",\n \"statement_min_bps\": 5000,\n \"wait\": {\n \"confidence_bps\": 5000,\n \"probability_bps\": 5000\n }\n },\n \"input_max_bytes\": 2,\n \"revision\": \"<string>\"\n }\n },\n \"inference\": {\n \"base_url\": \"<string>\",\n \"max_output_tokens\": 1,\n \"dialect\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.agentsfleet.net/v1/admin/models/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"metadata\": {\n \"advanced\": true,\n \"context_cap_tokens\": 123,\n \"context_source_url\": \"<string>\",\n \"context_verified_at\": \"2023-11-07T05:31:56Z\",\n \"display_name\": \"<string>\"\n },\n \"prices\": [\n {\n \"cached_input_nanos_per_mtok\": \"<string>\",\n \"conditions\": \"<string>\",\n \"effective_from\": \"2023-11-07T05:31:56Z\",\n \"input_nanos_per_mtok\": \"<string>\",\n \"output_nanos_per_mtok\": \"<string>\",\n \"prompt_tokens_above\": 123,\n \"source_url\": \"<string>\",\n \"verified_at\": \"2023-11-07T05:31:56Z\",\n \"cache_write_1h_nanos_per_mtok\": \"<string>\",\n \"cache_write_5m_nanos_per_mtok\": \"<string>\",\n \"cache_write_nanos_per_mtok\": \"<string>\",\n \"effective_until\": \"2023-11-07T05:31:56Z\"\n }\n ],\n \"decision\": {\n \"enabled\": true,\n \"prices\": [\n {\n \"cached_input_nanos_per_mtok\": \"<string>\",\n \"conditions\": \"<string>\",\n \"effective_from\": \"2023-11-07T05:31:56Z\",\n \"input_nanos_per_mtok\": \"<string>\",\n \"output_nanos_per_mtok\": \"<string>\",\n \"prompt_tokens_above\": 123,\n \"source_url\": \"<string>\",\n \"verified_at\": \"2023-11-07T05:31:56Z\",\n \"cache_write_1h_nanos_per_mtok\": \"<string>\",\n \"cache_write_5m_nanos_per_mtok\": \"<string>\",\n \"cache_write_nanos_per_mtok\": \"<string>\",\n \"effective_until\": \"2023-11-07T05:31:56Z\"\n }\n ],\n \"profile\": {\n \"accepted_models\": [\n \"<string>\"\n ],\n \"capabilities\": {\n \"choice\": true,\n \"noul\": true,\n \"score\": true\n },\n \"endpoint\": \"<string>\",\n \"evaluated_at\": \"2023-11-07T05:31:56Z\",\n \"evaluation_digest\": \"<string>\",\n \"evaluation_source_url\": \"<string>\",\n \"goal\": {\n \"continue_action\": {\n \"confidence_bps\": 5000,\n \"probability_bps\": 5000\n },\n \"questions_revision\": \"<string>\",\n \"statement_min_bps\": 5000,\n \"wait\": {\n \"confidence_bps\": 5000,\n \"probability_bps\": 5000\n }\n },\n \"input_max_bytes\": 2,\n \"revision\": \"<string>\"\n }\n },\n \"inference\": {\n \"base_url\": \"<string>\",\n \"max_output_tokens\": 1,\n \"dialect\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.agentsfleet.net/v1/admin/models/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"metadata\": {\n \"advanced\": true,\n \"context_cap_tokens\": 123,\n \"context_source_url\": \"<string>\",\n \"context_verified_at\": \"2023-11-07T05:31:56Z\",\n \"display_name\": \"<string>\"\n },\n \"prices\": [\n {\n \"cached_input_nanos_per_mtok\": \"<string>\",\n \"conditions\": \"<string>\",\n \"effective_from\": \"2023-11-07T05:31:56Z\",\n \"input_nanos_per_mtok\": \"<string>\",\n \"output_nanos_per_mtok\": \"<string>\",\n \"prompt_tokens_above\": 123,\n \"source_url\": \"<string>\",\n \"verified_at\": \"2023-11-07T05:31:56Z\",\n \"cache_write_1h_nanos_per_mtok\": \"<string>\",\n \"cache_write_5m_nanos_per_mtok\": \"<string>\",\n \"cache_write_nanos_per_mtok\": \"<string>\",\n \"effective_until\": \"2023-11-07T05:31:56Z\"\n }\n ],\n \"decision\": {\n \"enabled\": true,\n \"prices\": [\n {\n \"cached_input_nanos_per_mtok\": \"<string>\",\n \"conditions\": \"<string>\",\n \"effective_from\": \"2023-11-07T05:31:56Z\",\n \"input_nanos_per_mtok\": \"<string>\",\n \"output_nanos_per_mtok\": \"<string>\",\n \"prompt_tokens_above\": 123,\n \"source_url\": \"<string>\",\n \"verified_at\": \"2023-11-07T05:31:56Z\",\n \"cache_write_1h_nanos_per_mtok\": \"<string>\",\n \"cache_write_5m_nanos_per_mtok\": \"<string>\",\n \"cache_write_nanos_per_mtok\": \"<string>\",\n \"effective_until\": \"2023-11-07T05:31:56Z\"\n }\n ],\n \"profile\": {\n \"accepted_models\": [\n \"<string>\"\n ],\n \"capabilities\": {\n \"choice\": true,\n \"noul\": true,\n \"score\": true\n },\n \"endpoint\": \"<string>\",\n \"evaluated_at\": \"2023-11-07T05:31:56Z\",\n \"evaluation_digest\": \"<string>\",\n \"evaluation_source_url\": \"<string>\",\n \"goal\": {\n \"continue_action\": {\n \"confidence_bps\": 5000,\n \"probability_bps\": 5000\n },\n \"questions_revision\": \"<string>\",\n \"statement_min_bps\": 5000,\n \"wait\": {\n \"confidence_bps\": 5000,\n \"probability_bps\": 5000\n }\n },\n \"input_max_bytes\": 2,\n \"revision\": \"<string>\"\n }\n },\n \"inference\": {\n \"base_url\": \"<string>\",\n \"max_output_tokens\": 1,\n \"dialect\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"request_id": "<string>",
"updated": true
}{
"detail": "<string>",
"docs_uri": "<string>",
"error_code": "<string>",
"request_id": "<string>",
"title": "<string>",
"action_id": "<string>",
"current_state": "<string>",
"etag": "<string>",
"gate_id": "<string>",
"local_read_permitted": true,
"outcome": "<string>",
"resolved_at": "2023-11-07T05:31:56Z",
"resolved_by": "<string>",
"user_message": "<string>"
}{
"detail": "<string>",
"docs_uri": "<string>",
"error_code": "<string>",
"request_id": "<string>",
"title": "<string>",
"action_id": "<string>",
"current_state": "<string>",
"etag": "<string>",
"gate_id": "<string>",
"local_read_permitted": true,
"outcome": "<string>",
"resolved_at": "2023-11-07T05:31:56Z",
"resolved_by": "<string>",
"user_message": "<string>"
}{
"detail": "<string>",
"docs_uri": "<string>",
"error_code": "<string>",
"request_id": "<string>",
"title": "<string>",
"action_id": "<string>",
"current_state": "<string>",
"etag": "<string>",
"gate_id": "<string>",
"local_read_permitted": true,
"outcome": "<string>",
"resolved_at": "2023-11-07T05:31:56Z",
"resolved_by": "<string>",
"user_message": "<string>"
}{
"detail": "<string>",
"docs_uri": "<string>",
"error_code": "<string>",
"request_id": "<string>",
"title": "<string>",
"action_id": "<string>",
"current_state": "<string>",
"etag": "<string>",
"gate_id": "<string>",
"local_read_permitted": true,
"outcome": "<string>",
"resolved_at": "2023-11-07T05:31:56Z",
"resolved_by": "<string>",
"user_message": "<string>"
}{
"detail": "<string>",
"docs_uri": "<string>",
"error_code": "<string>",
"request_id": "<string>",
"title": "<string>",
"action_id": "<string>",
"current_state": "<string>",
"etag": "<string>",
"gate_id": "<string>",
"local_read_permitted": true,
"outcome": "<string>",
"resolved_at": "2023-11-07T05:31:56Z",
"resolved_by": "<string>",
"user_message": "<string>"
}{
"detail": "<string>",
"docs_uri": "<string>",
"error_code": "<string>",
"request_id": "<string>",
"title": "<string>",
"action_id": "<string>",
"current_state": "<string>",
"etag": "<string>",
"gate_id": "<string>",
"local_read_permitted": true,
"outcome": "<string>",
"resolved_at": "2023-11-07T05:31:56Z",
"resolved_by": "<string>",
"user_message": "<string>"
}{
"detail": "<string>",
"docs_uri": "<string>",
"error_code": "<string>",
"request_id": "<string>",
"title": "<string>",
"action_id": "<string>",
"current_state": "<string>",
"etag": "<string>",
"gate_id": "<string>",
"local_read_permitted": true,
"outcome": "<string>",
"resolved_at": "2023-11-07T05:31:56Z",
"resolved_by": "<string>",
"user_message": "<string>"
}Platform administration
Update model settings and rates
Updates model rates and inference settings without a restart. Requires model:admin. The provider and model_id fields cannot change.
PATCH
/
v1
/
admin
/
models
/
{id}
Update model settings and rates
curl --request PATCH \
--url https://api.agentsfleet.net/v1/admin/models/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"metadata": {
"advanced": true,
"context_cap_tokens": 123,
"context_source_url": "<string>",
"context_verified_at": "2023-11-07T05:31:56Z",
"display_name": "<string>"
},
"prices": [
{
"cached_input_nanos_per_mtok": "<string>",
"conditions": "<string>",
"effective_from": "2023-11-07T05:31:56Z",
"input_nanos_per_mtok": "<string>",
"output_nanos_per_mtok": "<string>",
"prompt_tokens_above": 123,
"source_url": "<string>",
"verified_at": "2023-11-07T05:31:56Z",
"cache_write_1h_nanos_per_mtok": "<string>",
"cache_write_5m_nanos_per_mtok": "<string>",
"cache_write_nanos_per_mtok": "<string>",
"effective_until": "2023-11-07T05:31:56Z"
}
],
"decision": {
"enabled": true,
"prices": [
{
"cached_input_nanos_per_mtok": "<string>",
"conditions": "<string>",
"effective_from": "2023-11-07T05:31:56Z",
"input_nanos_per_mtok": "<string>",
"output_nanos_per_mtok": "<string>",
"prompt_tokens_above": 123,
"source_url": "<string>",
"verified_at": "2023-11-07T05:31:56Z",
"cache_write_1h_nanos_per_mtok": "<string>",
"cache_write_5m_nanos_per_mtok": "<string>",
"cache_write_nanos_per_mtok": "<string>",
"effective_until": "2023-11-07T05:31:56Z"
}
],
"profile": {
"accepted_models": [
"<string>"
],
"capabilities": {
"choice": true,
"noul": true,
"score": true
},
"endpoint": "<string>",
"evaluated_at": "2023-11-07T05:31:56Z",
"evaluation_digest": "<string>",
"evaluation_source_url": "<string>",
"goal": {
"continue_action": {
"confidence_bps": 5000,
"probability_bps": 5000
},
"questions_revision": "<string>",
"statement_min_bps": 5000,
"wait": {
"confidence_bps": 5000,
"probability_bps": 5000
}
},
"input_max_bytes": 2,
"revision": "<string>"
}
},
"inference": {
"base_url": "<string>",
"max_output_tokens": 1,
"dialect": "<string>"
}
}
'import requests
url = "https://api.agentsfleet.net/v1/admin/models/{id}"
payload = {
"metadata": {
"advanced": True,
"context_cap_tokens": 123,
"context_source_url": "<string>",
"context_verified_at": "2023-11-07T05:31:56Z",
"display_name": "<string>"
},
"prices": [
{
"cached_input_nanos_per_mtok": "<string>",
"conditions": "<string>",
"effective_from": "2023-11-07T05:31:56Z",
"input_nanos_per_mtok": "<string>",
"output_nanos_per_mtok": "<string>",
"prompt_tokens_above": 123,
"source_url": "<string>",
"verified_at": "2023-11-07T05:31:56Z",
"cache_write_1h_nanos_per_mtok": "<string>",
"cache_write_5m_nanos_per_mtok": "<string>",
"cache_write_nanos_per_mtok": "<string>",
"effective_until": "2023-11-07T05:31:56Z"
}
],
"decision": {
"enabled": True,
"prices": [
{
"cached_input_nanos_per_mtok": "<string>",
"conditions": "<string>",
"effective_from": "2023-11-07T05:31:56Z",
"input_nanos_per_mtok": "<string>",
"output_nanos_per_mtok": "<string>",
"prompt_tokens_above": 123,
"source_url": "<string>",
"verified_at": "2023-11-07T05:31:56Z",
"cache_write_1h_nanos_per_mtok": "<string>",
"cache_write_5m_nanos_per_mtok": "<string>",
"cache_write_nanos_per_mtok": "<string>",
"effective_until": "2023-11-07T05:31:56Z"
}
],
"profile": {
"accepted_models": ["<string>"],
"capabilities": {
"choice": True,
"noul": True,
"score": True
},
"endpoint": "<string>",
"evaluated_at": "2023-11-07T05:31:56Z",
"evaluation_digest": "<string>",
"evaluation_source_url": "<string>",
"goal": {
"continue_action": {
"confidence_bps": 5000,
"probability_bps": 5000
},
"questions_revision": "<string>",
"statement_min_bps": 5000,
"wait": {
"confidence_bps": 5000,
"probability_bps": 5000
}
},
"input_max_bytes": 2,
"revision": "<string>"
}
},
"inference": {
"base_url": "<string>",
"max_output_tokens": 1,
"dialect": "<string>"
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
metadata: {
advanced: true,
context_cap_tokens: 123,
context_source_url: '<string>',
context_verified_at: '2023-11-07T05:31:56Z',
display_name: '<string>'
},
prices: [
{
cached_input_nanos_per_mtok: '<string>',
conditions: '<string>',
effective_from: '2023-11-07T05:31:56Z',
input_nanos_per_mtok: '<string>',
output_nanos_per_mtok: '<string>',
prompt_tokens_above: 123,
source_url: '<string>',
verified_at: '2023-11-07T05:31:56Z',
cache_write_1h_nanos_per_mtok: '<string>',
cache_write_5m_nanos_per_mtok: '<string>',
cache_write_nanos_per_mtok: '<string>',
effective_until: '2023-11-07T05:31:56Z'
}
],
decision: {
enabled: true,
prices: [
{
cached_input_nanos_per_mtok: '<string>',
conditions: '<string>',
effective_from: '2023-11-07T05:31:56Z',
input_nanos_per_mtok: '<string>',
output_nanos_per_mtok: '<string>',
prompt_tokens_above: 123,
source_url: '<string>',
verified_at: '2023-11-07T05:31:56Z',
cache_write_1h_nanos_per_mtok: '<string>',
cache_write_5m_nanos_per_mtok: '<string>',
cache_write_nanos_per_mtok: '<string>',
effective_until: '2023-11-07T05:31:56Z'
}
],
profile: {
accepted_models: ['<string>'],
capabilities: {choice: true, noul: true, score: true},
endpoint: '<string>',
evaluated_at: '2023-11-07T05:31:56Z',
evaluation_digest: '<string>',
evaluation_source_url: '<string>',
goal: {
continue_action: {confidence_bps: 5000, probability_bps: 5000},
questions_revision: '<string>',
statement_min_bps: 5000,
wait: {confidence_bps: 5000, probability_bps: 5000}
},
input_max_bytes: 2,
revision: '<string>'
}
},
inference: {base_url: '<string>', max_output_tokens: 1, dialect: '<string>'}
})
};
fetch('https://api.agentsfleet.net/v1/admin/models/{id}', 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://api.agentsfleet.net/v1/admin/models/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'metadata' => [
'advanced' => true,
'context_cap_tokens' => 123,
'context_source_url' => '<string>',
'context_verified_at' => '2023-11-07T05:31:56Z',
'display_name' => '<string>'
],
'prices' => [
[
'cached_input_nanos_per_mtok' => '<string>',
'conditions' => '<string>',
'effective_from' => '2023-11-07T05:31:56Z',
'input_nanos_per_mtok' => '<string>',
'output_nanos_per_mtok' => '<string>',
'prompt_tokens_above' => 123,
'source_url' => '<string>',
'verified_at' => '2023-11-07T05:31:56Z',
'cache_write_1h_nanos_per_mtok' => '<string>',
'cache_write_5m_nanos_per_mtok' => '<string>',
'cache_write_nanos_per_mtok' => '<string>',
'effective_until' => '2023-11-07T05:31:56Z'
]
],
'decision' => [
'enabled' => true,
'prices' => [
[
'cached_input_nanos_per_mtok' => '<string>',
'conditions' => '<string>',
'effective_from' => '2023-11-07T05:31:56Z',
'input_nanos_per_mtok' => '<string>',
'output_nanos_per_mtok' => '<string>',
'prompt_tokens_above' => 123,
'source_url' => '<string>',
'verified_at' => '2023-11-07T05:31:56Z',
'cache_write_1h_nanos_per_mtok' => '<string>',
'cache_write_5m_nanos_per_mtok' => '<string>',
'cache_write_nanos_per_mtok' => '<string>',
'effective_until' => '2023-11-07T05:31:56Z'
]
],
'profile' => [
'accepted_models' => [
'<string>'
],
'capabilities' => [
'choice' => true,
'noul' => true,
'score' => true
],
'endpoint' => '<string>',
'evaluated_at' => '2023-11-07T05:31:56Z',
'evaluation_digest' => '<string>',
'evaluation_source_url' => '<string>',
'goal' => [
'continue_action' => [
'confidence_bps' => 5000,
'probability_bps' => 5000
],
'questions_revision' => '<string>',
'statement_min_bps' => 5000,
'wait' => [
'confidence_bps' => 5000,
'probability_bps' => 5000
]
],
'input_max_bytes' => 2,
'revision' => '<string>'
]
],
'inference' => [
'base_url' => '<string>',
'max_output_tokens' => 1,
'dialect' => '<string>'
]
]),
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://api.agentsfleet.net/v1/admin/models/{id}"
payload := strings.NewReader("{\n \"metadata\": {\n \"advanced\": true,\n \"context_cap_tokens\": 123,\n \"context_source_url\": \"<string>\",\n \"context_verified_at\": \"2023-11-07T05:31:56Z\",\n \"display_name\": \"<string>\"\n },\n \"prices\": [\n {\n \"cached_input_nanos_per_mtok\": \"<string>\",\n \"conditions\": \"<string>\",\n \"effective_from\": \"2023-11-07T05:31:56Z\",\n \"input_nanos_per_mtok\": \"<string>\",\n \"output_nanos_per_mtok\": \"<string>\",\n \"prompt_tokens_above\": 123,\n \"source_url\": \"<string>\",\n \"verified_at\": \"2023-11-07T05:31:56Z\",\n \"cache_write_1h_nanos_per_mtok\": \"<string>\",\n \"cache_write_5m_nanos_per_mtok\": \"<string>\",\n \"cache_write_nanos_per_mtok\": \"<string>\",\n \"effective_until\": \"2023-11-07T05:31:56Z\"\n }\n ],\n \"decision\": {\n \"enabled\": true,\n \"prices\": [\n {\n \"cached_input_nanos_per_mtok\": \"<string>\",\n \"conditions\": \"<string>\",\n \"effective_from\": \"2023-11-07T05:31:56Z\",\n \"input_nanos_per_mtok\": \"<string>\",\n \"output_nanos_per_mtok\": \"<string>\",\n \"prompt_tokens_above\": 123,\n \"source_url\": \"<string>\",\n \"verified_at\": \"2023-11-07T05:31:56Z\",\n \"cache_write_1h_nanos_per_mtok\": \"<string>\",\n \"cache_write_5m_nanos_per_mtok\": \"<string>\",\n \"cache_write_nanos_per_mtok\": \"<string>\",\n \"effective_until\": \"2023-11-07T05:31:56Z\"\n }\n ],\n \"profile\": {\n \"accepted_models\": [\n \"<string>\"\n ],\n \"capabilities\": {\n \"choice\": true,\n \"noul\": true,\n \"score\": true\n },\n \"endpoint\": \"<string>\",\n \"evaluated_at\": \"2023-11-07T05:31:56Z\",\n \"evaluation_digest\": \"<string>\",\n \"evaluation_source_url\": \"<string>\",\n \"goal\": {\n \"continue_action\": {\n \"confidence_bps\": 5000,\n \"probability_bps\": 5000\n },\n \"questions_revision\": \"<string>\",\n \"statement_min_bps\": 5000,\n \"wait\": {\n \"confidence_bps\": 5000,\n \"probability_bps\": 5000\n }\n },\n \"input_max_bytes\": 2,\n \"revision\": \"<string>\"\n }\n },\n \"inference\": {\n \"base_url\": \"<string>\",\n \"max_output_tokens\": 1,\n \"dialect\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.agentsfleet.net/v1/admin/models/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"metadata\": {\n \"advanced\": true,\n \"context_cap_tokens\": 123,\n \"context_source_url\": \"<string>\",\n \"context_verified_at\": \"2023-11-07T05:31:56Z\",\n \"display_name\": \"<string>\"\n },\n \"prices\": [\n {\n \"cached_input_nanos_per_mtok\": \"<string>\",\n \"conditions\": \"<string>\",\n \"effective_from\": \"2023-11-07T05:31:56Z\",\n \"input_nanos_per_mtok\": \"<string>\",\n \"output_nanos_per_mtok\": \"<string>\",\n \"prompt_tokens_above\": 123,\n \"source_url\": \"<string>\",\n \"verified_at\": \"2023-11-07T05:31:56Z\",\n \"cache_write_1h_nanos_per_mtok\": \"<string>\",\n \"cache_write_5m_nanos_per_mtok\": \"<string>\",\n \"cache_write_nanos_per_mtok\": \"<string>\",\n \"effective_until\": \"2023-11-07T05:31:56Z\"\n }\n ],\n \"decision\": {\n \"enabled\": true,\n \"prices\": [\n {\n \"cached_input_nanos_per_mtok\": \"<string>\",\n \"conditions\": \"<string>\",\n \"effective_from\": \"2023-11-07T05:31:56Z\",\n \"input_nanos_per_mtok\": \"<string>\",\n \"output_nanos_per_mtok\": \"<string>\",\n \"prompt_tokens_above\": 123,\n \"source_url\": \"<string>\",\n \"verified_at\": \"2023-11-07T05:31:56Z\",\n \"cache_write_1h_nanos_per_mtok\": \"<string>\",\n \"cache_write_5m_nanos_per_mtok\": \"<string>\",\n \"cache_write_nanos_per_mtok\": \"<string>\",\n \"effective_until\": \"2023-11-07T05:31:56Z\"\n }\n ],\n \"profile\": {\n \"accepted_models\": [\n \"<string>\"\n ],\n \"capabilities\": {\n \"choice\": true,\n \"noul\": true,\n \"score\": true\n },\n \"endpoint\": \"<string>\",\n \"evaluated_at\": \"2023-11-07T05:31:56Z\",\n \"evaluation_digest\": \"<string>\",\n \"evaluation_source_url\": \"<string>\",\n \"goal\": {\n \"continue_action\": {\n \"confidence_bps\": 5000,\n \"probability_bps\": 5000\n },\n \"questions_revision\": \"<string>\",\n \"statement_min_bps\": 5000,\n \"wait\": {\n \"confidence_bps\": 5000,\n \"probability_bps\": 5000\n }\n },\n \"input_max_bytes\": 2,\n \"revision\": \"<string>\"\n }\n },\n \"inference\": {\n \"base_url\": \"<string>\",\n \"max_output_tokens\": 1,\n \"dialect\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.agentsfleet.net/v1/admin/models/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"metadata\": {\n \"advanced\": true,\n \"context_cap_tokens\": 123,\n \"context_source_url\": \"<string>\",\n \"context_verified_at\": \"2023-11-07T05:31:56Z\",\n \"display_name\": \"<string>\"\n },\n \"prices\": [\n {\n \"cached_input_nanos_per_mtok\": \"<string>\",\n \"conditions\": \"<string>\",\n \"effective_from\": \"2023-11-07T05:31:56Z\",\n \"input_nanos_per_mtok\": \"<string>\",\n \"output_nanos_per_mtok\": \"<string>\",\n \"prompt_tokens_above\": 123,\n \"source_url\": \"<string>\",\n \"verified_at\": \"2023-11-07T05:31:56Z\",\n \"cache_write_1h_nanos_per_mtok\": \"<string>\",\n \"cache_write_5m_nanos_per_mtok\": \"<string>\",\n \"cache_write_nanos_per_mtok\": \"<string>\",\n \"effective_until\": \"2023-11-07T05:31:56Z\"\n }\n ],\n \"decision\": {\n \"enabled\": true,\n \"prices\": [\n {\n \"cached_input_nanos_per_mtok\": \"<string>\",\n \"conditions\": \"<string>\",\n \"effective_from\": \"2023-11-07T05:31:56Z\",\n \"input_nanos_per_mtok\": \"<string>\",\n \"output_nanos_per_mtok\": \"<string>\",\n \"prompt_tokens_above\": 123,\n \"source_url\": \"<string>\",\n \"verified_at\": \"2023-11-07T05:31:56Z\",\n \"cache_write_1h_nanos_per_mtok\": \"<string>\",\n \"cache_write_5m_nanos_per_mtok\": \"<string>\",\n \"cache_write_nanos_per_mtok\": \"<string>\",\n \"effective_until\": \"2023-11-07T05:31:56Z\"\n }\n ],\n \"profile\": {\n \"accepted_models\": [\n \"<string>\"\n ],\n \"capabilities\": {\n \"choice\": true,\n \"noul\": true,\n \"score\": true\n },\n \"endpoint\": \"<string>\",\n \"evaluated_at\": \"2023-11-07T05:31:56Z\",\n \"evaluation_digest\": \"<string>\",\n \"evaluation_source_url\": \"<string>\",\n \"goal\": {\n \"continue_action\": {\n \"confidence_bps\": 5000,\n \"probability_bps\": 5000\n },\n \"questions_revision\": \"<string>\",\n \"statement_min_bps\": 5000,\n \"wait\": {\n \"confidence_bps\": 5000,\n \"probability_bps\": 5000\n }\n },\n \"input_max_bytes\": 2,\n \"revision\": \"<string>\"\n }\n },\n \"inference\": {\n \"base_url\": \"<string>\",\n \"max_output_tokens\": 1,\n \"dialect\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"request_id": "<string>",
"updated": true
}{
"detail": "<string>",
"docs_uri": "<string>",
"error_code": "<string>",
"request_id": "<string>",
"title": "<string>",
"action_id": "<string>",
"current_state": "<string>",
"etag": "<string>",
"gate_id": "<string>",
"local_read_permitted": true,
"outcome": "<string>",
"resolved_at": "2023-11-07T05:31:56Z",
"resolved_by": "<string>",
"user_message": "<string>"
}{
"detail": "<string>",
"docs_uri": "<string>",
"error_code": "<string>",
"request_id": "<string>",
"title": "<string>",
"action_id": "<string>",
"current_state": "<string>",
"etag": "<string>",
"gate_id": "<string>",
"local_read_permitted": true,
"outcome": "<string>",
"resolved_at": "2023-11-07T05:31:56Z",
"resolved_by": "<string>",
"user_message": "<string>"
}{
"detail": "<string>",
"docs_uri": "<string>",
"error_code": "<string>",
"request_id": "<string>",
"title": "<string>",
"action_id": "<string>",
"current_state": "<string>",
"etag": "<string>",
"gate_id": "<string>",
"local_read_permitted": true,
"outcome": "<string>",
"resolved_at": "2023-11-07T05:31:56Z",
"resolved_by": "<string>",
"user_message": "<string>"
}{
"detail": "<string>",
"docs_uri": "<string>",
"error_code": "<string>",
"request_id": "<string>",
"title": "<string>",
"action_id": "<string>",
"current_state": "<string>",
"etag": "<string>",
"gate_id": "<string>",
"local_read_permitted": true,
"outcome": "<string>",
"resolved_at": "2023-11-07T05:31:56Z",
"resolved_by": "<string>",
"user_message": "<string>"
}{
"detail": "<string>",
"docs_uri": "<string>",
"error_code": "<string>",
"request_id": "<string>",
"title": "<string>",
"action_id": "<string>",
"current_state": "<string>",
"etag": "<string>",
"gate_id": "<string>",
"local_read_permitted": true,
"outcome": "<string>",
"resolved_at": "2023-11-07T05:31:56Z",
"resolved_by": "<string>",
"user_message": "<string>"
}{
"detail": "<string>",
"docs_uri": "<string>",
"error_code": "<string>",
"request_id": "<string>",
"title": "<string>",
"action_id": "<string>",
"current_state": "<string>",
"etag": "<string>",
"gate_id": "<string>",
"local_read_permitted": true,
"outcome": "<string>",
"resolved_at": "2023-11-07T05:31:56Z",
"resolved_by": "<string>",
"user_message": "<string>"
}{
"detail": "<string>",
"docs_uri": "<string>",
"error_code": "<string>",
"request_id": "<string>",
"title": "<string>",
"action_id": "<string>",
"current_state": "<string>",
"etag": "<string>",
"gate_id": "<string>",
"local_read_permitted": true,
"outcome": "<string>",
"resolved_at": "2023-11-07T05:31:56Z",
"resolved_by": "<string>",
"user_message": "<string>"
}Authorizations
Path Parameters
Body
application/json
PATCH /v1/admin/models/{id} input: a complete replacement of the
evidence and the price schedule, and optionally of the inference settings.