Skip to main content
POST
/
v1
/
models
Create Model
curl --request POST \
  --url https://api-tokyo.oneinbox.ai/v1/models \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "provider": "openai",
  "model": "gpt-4o-mini",
  "system_prompt": "You are a helpful voice assistant.",
  "temperature": 0.7,
  "max_tokens": 64000,
  "tool_ids": [
    "3c90c3cc-0d44-4b50-8888-8dd25736052a"
  ],
  "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"

payload = {
"name": "<string>",
"provider": "openai",
"model": "gpt-4o-mini",
"system_prompt": "You are a helpful voice assistant.",
"temperature": 0.7,
"max_tokens": 64000,
"tool_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"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.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
provider: 'openai',
model: 'gpt-4o-mini',
system_prompt: 'You are a helpful voice assistant.',
temperature: 0.7,
max_tokens: 64000,
tool_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
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', 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"

payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"provider\": \"openai\",\n \"model\": \"gpt-4o-mini\",\n \"system_prompt\": \"You are a helpful voice assistant.\",\n \"temperature\": 0.7,\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 \"custom_websocket_url\": \"<string>\",\n \"credential_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}")

req, _ := http.NewRequest("POST", 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.

Body

application/json
name
string
required
Required string length: 1 - 255
provider
enum<string>
default:openai

LLM provider. Use 'custom' to bring your own OpenAI-compatible model served over a WebSocket/HTTP endpoint — set its URL in custom_websocket_url (the endpoint MUST speak the OpenAI API).

Available options:
openai,
anthropic,
groq,
deepgram,
shisa,
custom
model
enum<string>
default:gpt-4o-mini
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
Required string length: 1 - 255
system_prompt
string
default:You are a helpful voice assistant.
Minimum string length: 1
temperature
number
default:0.7
Required range: 0 <= x <= 2
max_tokens
integer | null
Required range: 1 <= x <= 128000
tool_ids
string<uuid>[]
knowledge_base_ids
string<uuid>[]
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