Skip to main content
POST
/
{resourceSlug}
/
forms
/
{modelId}
/
edit
Edit A Model
curl --request POST \
  --url https://app.agentcloud.dev/{resourceSlug}/forms/{modelId}/edit \
  --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}

modelId
string
required

The ID of the model to be edited. Mongodb Object id, unique identifier, length of 24 characters fitting the following regex; [a-f0-9]{24}

Body

model.json

JSON body containing the edited model data. All fields must be included, with updated values for those that need changes.

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.