Skip to main content
POST
/
models
Create AI model
curl --request POST \
  --url https://api.dev.knowmio.com/api/models \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "slug": "<string>",
  "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)

Body

application/json
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

Response

Model created 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