Skip to main content
PUT
/
models
Update AI model
curl --request PUT \
  --url https://api.dev.knowmio.com/api/models \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "name": "<string>",
  "type": "language",
  "provider": "openai",
  "inputModalities": [
    "text"
  ],
  "outputModalities": [
    "text"
  ],
  "pricing": {
    "prompt": 123,
    "completion": 123
  }
}
'
{
  "slug": "<string>",
  "name": "<string>",
  "type": "language",
  "provider": "openai",
  "inputModalities": [
    "text"
  ],
  "outputModalities": [
    "text"
  ],
  "pricing": {
    "prompt": 123,
    "completion": 123
  },
  "createdAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z"
}

Authorizations

x-api-key
string
header
required

API key for authentication (lowercase header name)

Query Parameters

slug
string
required

Model slug to update

Body

application/json
name
string

Display name of the model

type
enum<string>

Type of model

Available options:
language,
embedding
provider
enum<string>

AI provider

Available options:
openai,
anthropic,
google,
cohere,
bedrock
inputModalities
enum<string>[]

Supported input modalities

Available options:
text,
image,
file,
audio,
video
outputModalities
enum<string>[]

Supported output modalities

Available options:
text,
image,
file,
audio,
video
pricing
object

Pricing information for the model

Response

Model updated successfully

slug
string
required

Unique identifier for the model

name
string
required

Display name of the model

type
enum<string>
required

Type of model

Available options:
language,
embedding
provider
enum<string>
required

AI provider

Available options:
openai,
anthropic,
google,
cohere,
bedrock
inputModalities
enum<string>[]
required

Supported input modalities

Available options:
text,
image,
file,
audio,
video
outputModalities
enum<string>[]
required

Supported output modalities

Available options:
text,
image,
file,
audio,
video
pricing
object
required

Pricing information for the model

createdAt
string<date-time>
required
updatedAt
string<date-time>
required