Skip to main content
PATCH
/
v1
/
models
/
{model_id}
Update Model
curl --request PATCH \
  --url https://api-tokyo.oneinbox.ai/v1/models/{model_id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "system_prompt": "<string>",
  "temperature": 1,
  "max_tokens": 64000,
  "tool_ids": [
    "3c90c3cc-0d44-4b50-8888-8dd25736052a"
  ],
  "knowledge_base_ids": [
    "3c90c3cc-0d44-4b50-8888-8dd25736052a"
  ],
  "remove_tool_ids": [
    "3c90c3cc-0d44-4b50-8888-8dd25736052a"
  ],
  "remove_knowledge_base_ids": [
    "3c90c3cc-0d44-4b50-8888-8dd25736052a"
  ],
  "custom_websocket_url": "<string>",
  "credential_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'
import requests

url = "https://api-tokyo.oneinbox.ai/v1/models/{model_id}"

payload = {
"name": "<string>",
"system_prompt": "<string>",
"temperature": 1,
"max_tokens": 64000,
"tool_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"knowledge_base_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"remove_tool_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"remove_knowledge_base_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"custom_websocket_url": "<string>",
"credential_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
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({
name: '<string>',
system_prompt: '<string>',
temperature: 1,
max_tokens: 64000,
tool_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
knowledge_base_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
remove_tool_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
remove_knowledge_base_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
custom_websocket_url: '<string>',
credential_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
})
};

fetch('https://api-tokyo.oneinbox.ai/v1/models/{model_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://api-tokyo.oneinbox.ai/v1/models/{model_id}"

payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"system_prompt\": \"<string>\",\n \"temperature\": 1,\n \"max_tokens\": 64000,\n \"tool_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"knowledge_base_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"remove_tool_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"remove_knowledge_base_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"custom_websocket_url\": \"<string>\",\n \"credential_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\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))

}
{
  "id": "<string>",
  "name": "<string>",
  "provider": "<string>",
  "model": "<string>",
  "system_prompt": "<string>",
  "temperature": 123,
  "max_tokens": 123,
  "tool_ids": [
    "<string>"
  ],
  "knowledge_base_ids": [
    "<string>"
  ],
  "custom_websocket_url": "<string>",
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z",
  "credential_id": "<string>"
}
{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}

Authorizations

Authorization
string
header
required

Your API key sent as a Bearer credential — Authorization: Bearer <api_key>, where <api_key> starts with oi_sk_ (create one via POST /v1/api-keys). Although the field is labelled 'token', paste your API key here. A dashboard JWT is also accepted on this header for the same endpoints.

Path Parameters

model_id
string<uuid>
required

Body

application/json
name
string | null
Required string length: 1 - 255
provider
enum<string> | null

Switch the model's provider. Use 'custom' for your own OpenAI-compatible endpoint (set custom_websocket_url). When you change provider, send a compatible model too — the new (provider, model) pair is validated against that provider's catalogue.

Available options:
openai,
anthropic,
groq,
deepgram,
shisa,
custom
model
enum<string>
Available options:
gpt-4o,
gpt-4o-mini,
gpt-4.1,
gpt-4.1-mini,
gpt-4-turbo,
gpt-5,
gpt-5-mini,
gpt-5-nano,
gpt-5-pro,
gpt-5-chat-latest,
gpt-5.1,
gpt-5.1-chat-latest,
gpt-5.1-codex,
gpt-5.1-codex-max,
gpt-5.1-codex-mini,
gpt-5.2,
gpt-5.2-chat-latest,
gpt-5.2-codex,
gpt-5.2-pro,
gpt-5.3-chat-latest,
gpt-5.3-codex,
gpt-5.4,
gpt-5.4-mini,
gpt-5.4-nano,
gpt-5.4-pro,
gpt-5.5,
gpt-5.5-pro,
o1,
o1-mini,
o3-mini,
claude-3-5-sonnet-20241022,
claude-3-5-haiku-20241022,
claude-3-7-sonnet-20250219,
claude-sonnet-4-5,
claude-haiku-4-5,
claude-opus-4-1,
llama-3.3-70b-versatile,
llama-3.1-8b-instant,
llama-3.1-70b-versatile,
mixtral-8x7b-32768,
gemma2-9b-it,
shisa-ai/shisa-v2.1-llama3.3-70b
system_prompt
string | null
temperature
number | null
Required range: 0 <= x <= 2
max_tokens
integer | null
Required range: 1 <= x <= 128000
tool_ids
string<uuid>[] | null
knowledge_base_ids
string<uuid>[] | null
remove_tool_ids
string<uuid>[] | null

Tool ids to DETACH from this LLM (counterpart to tool_ids' add).

remove_knowledge_base_ids
string<uuid>[] | null

KB ids to DETACH from this LLM (counterpart to knowledge_base_ids' add).

custom_websocket_url
string | null

Required when provider='custom': the URL of your OpenAI-compatible LLM endpoint (wss://, ws://, https:// or http://). 'custom' means you bring your own OpenAI-compatible server; this is where the worker connects.

credential_id
string<uuid> | null

Response

Successful Response

id
string
required
name
string
required
provider
string
required
model
string
required
system_prompt
string
required
temperature
number
required
max_tokens
integer | null
required
tool_ids
string[]
required
knowledge_base_ids
string[]
required
custom_websocket_url
string | null
required
created_at
string<date-time>
required
updated_at
string<date-time>
required
credential_id
string