Skip to main content
POST
/
{resourceSlug}
/
forms
/
model
/
add
Add A New Model
curl --request POST \
  --url https://app.agentcloud.dev/{resourceSlug}/forms/model/add \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: model.json' \
  --data '
{
  "_id": "<string>",
  "orgId": "<string>",
  "teamId": "<string>",
  "name": "<string>",
  "model": "<string>",
  "embeddingLength": 123,
  "modelType": "<string>",
  "type": "<string>",
  "config": {
    "model": "<string>",
    "api_key": "<string>",
    "base_url": "<string>",
    "cohere_api_key": "<string>",
    "groq_api_key": "<string>"
  }
}
'
{
  "_id": "<string>",
  "redirect": "<string>"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

resourceSlug
string
required

The resourceSlug is a URL parameter of the teamId associated with the user. Mongodb Object id, unique identifier, length of 24 characters fitting the following regex; [a-f0-9]{24}

Body

model.json

JSON body containing the model object to be added. Do not include an '_id', as this will be automatically generated.

Represents an AI model used within a team or organization.

_id
string
required

Unique identifier for the model.

orgId
string
required

Identifier of the organization to which the model belongs.

teamId
string
required

Identifier of the team to which the model belongs.

name
string
required

The name of the model.

model
string
required

The specific AI model used.

embeddingLength
integer
required

The length of the embeddings generated by the model.

modelType
string
required

The type of the model.

type
string
required

The general type of the model (e.g., embedding, language model).

config
object
required

Configuration settings for the model.

Response

Successful operation, redirect to '/{resourceSlug}/models'.

Server response after successsfully adding a new object

_id
string

The unique Mongo id of the newly inserted object.

redirect
string

a string containing the redirect link to get all objects after a successful insertion.