Skip to main content
POST
/
v2.0
/
largelanguagemodels
Creates a new LargeLanguageModel
curl --request POST \
  --url https://api-trial.cognigy.ai/new/v2.0/largelanguagemodels \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '{
  "name": "LLM Name",
  "description": "LLM meaningful description",
  "modelType": "gpt-3.5-turbo",
  "modelGroup": "chat",
  "isCustomModel": true,
  "provider": "azureOpenAI",
  "connectionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "openAI": {
    "customModel": "gpt-4-32k-0613"
  },
  "anthropic": {
    "customModel": "claude-3-opus-20240229"
  },
  "azureOpenAI": {
    "resourceName": "<string>",
    "deploymentName": "<string>",
    "apiVersion": "<string>",
    "baseCustomUrl": [
      "https://<resourceName>.openai.azure.com/openai/deployments/<deploymentName>/chat/completions?api-version=<apiVersion>",
      "https://<resourceName>.openai.azure.com/openai/deployments/<deploymentName>/completions?api-version=<apiVersion>",
      "https://<resourceName>.openai.azure.com/openai/deployments/<deploymentName>/embeddings?api-version=<apiVersion>"
    ]
  },
  "googleVertexAI": {
    "location": "<string>",
    "apiEndpoint": "<string>",
    "publisher": "<string>"
  },
  "googleGemini": {
    "location": "<string>"
  },
  "alephAlpha": {
    "customModel": "luminous-003",
    "baseCustomUrl": "https://api.aleph-alpha.com"
  },
  "openAICompatible": {
    "customModel": "luminous-003",
    "baseCustomUrl": "https://own-llm-deployment.company.com/openai/v1",
    "customAuthHeader": "Ocp-Apim-Subscription-Key"
  },
  "resourceLevel": "organisation",
  "assignedToProjects": [
    "<string>"
  ]
}'
{
  "name": "LLM Name",
  "description": "LLM meaningful description",
  "modelType": "gpt-3.5-turbo",
  "modelGroup": "chat",
  "isCustomModel": true,
  "provider": "azureOpenAI",
  "connectionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "openAI": {
    "customModel": "gpt-4-32k-0613"
  },
  "anthropic": {
    "customModel": "claude-3-opus-20240229"
  },
  "azureOpenAI": {
    "resourceName": "<string>",
    "deploymentName": "<string>",
    "apiVersion": "<string>",
    "baseCustomUrl": [
      "https://<resourceName>.openai.azure.com/openai/deployments/<deploymentName>/chat/completions?api-version=<apiVersion>",
      "https://<resourceName>.openai.azure.com/openai/deployments/<deploymentName>/completions?api-version=<apiVersion>",
      "https://<resourceName>.openai.azure.com/openai/deployments/<deploymentName>/embeddings?api-version=<apiVersion>"
    ]
  },
  "googleVertexAI": {
    "location": "<string>",
    "apiEndpoint": "<string>",
    "publisher": "<string>"
  },
  "googleGemini": {
    "location": "<string>"
  },
  "alephAlpha": {
    "customModel": "luminous-003",
    "baseCustomUrl": "https://api.aleph-alpha.com"
  },
  "openAICompatible": {
    "customModel": "luminous-003",
    "baseCustomUrl": "https://own-llm-deployment.company.com/openai/v1",
    "customAuthHeader": "Ocp-Apim-Subscription-Key"
  },
  "resourceLevel": "organisation",
  "assignedToProjects": [
    "<string>"
  ],
  "referenceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "_id": "<string>",
  "createdAt": 1694518620,
  "lastChanged": 1694518620,
  "createdBy": "<string>",
  "lastChangedBy": "<string>"
}

Authorizations

X-API-Key
string
header
required

Supply the API Key in the HTTP-Header

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

api_key
string
query
required

Supply the API Key in the Url-Query

Headers

Accept
enum<string>

The default media type is application/hal+json. Use application/json for pure data results.

Available options:
application/json,
application/hal+json,
application/xml,
text/xml,
text/csv

Body

application/json
  • Global LLM Resource
  • Project Level LLM Resource
name
string
required
Example:

"LLM Name"

modelType
enum<string>
required
Available options:
gpt-3.5-turbo,
gpt-3.5-turbo-instruct,
gpt-4,
gpt-4o,
gpt-4o-mini,
text-embedding-ada-002,
luminous-extended-control,
luminous-embedding-128,
Pharia-1-Embedding-4608,
claude-v1-100k,
claude-instant-v1,
claude-3-opus-20240229,
custom-model,
custom-embedding-model,
gemini-2.0-flash,
gemini-2.0-flash-lite,
mistral-large-2411,
mistral-small-2503,
pixtral-large-2411,
pixtral-12b-2409
provider
enum<string>
required
Available options:
azureOpenAI,
openAI,
anthropic,
googleVertexAI,
googleGemini,
alephAlpha,
awsBedrock,
mistral
connectionId
string<uuid>
required

The reference id of the GenerativeAI Provider Connection

resourceLevel
enum<string>
required

Scope for globally scoped resources.

Available options:
organisation
description
string
Example:

"LLM meaningful description"

modelGroup
enum<string>
Available options:
chat,
completion
isCustomModel
boolean
Example:

true

openAI
object

OpenAI specific meta data

anthropic
object

Anthropic specific meta data

azureOpenAI
object

Azure OpenAI specific meta data

googleVertexAI
object

Google VertexAI specific meta data

googleGemini
object

Google Gemini specific meta data

alephAlpha
object

Aleph Alpha specific meta data

openAICompatible
object

OpenAI compatible provider

assignedToProjects
string[]

MongoDB ObjectId representing a project

Response

Returns LargeLanguageModel metadata object.

  • Option 1
  • Option 2

The IEntityMeta defines meta information every entity within the system has. These are dates when a resource was created and modified as well as information about the user who initially created a resource and who modified it the last time.

name
string
required
Example:

"LLM Name"

modelType
enum<string>
required
Available options:
gpt-3.5-turbo,
gpt-3.5-turbo-instruct,
gpt-4,
gpt-4o,
gpt-4o-mini,
text-embedding-ada-002,
luminous-extended-control,
luminous-embedding-128,
Pharia-1-Embedding-4608,
claude-v1-100k,
claude-instant-v1,
claude-3-opus-20240229,
custom-model,
custom-embedding-model,
gemini-2.0-flash,
gemini-2.0-flash-lite,
mistral-large-2411,
mistral-small-2503,
pixtral-large-2411,
pixtral-12b-2409
provider
enum<string>
required
Available options:
azureOpenAI,
openAI,
anthropic,
googleVertexAI,
googleGemini,
alephAlpha,
awsBedrock,
mistral
connectionId
string<uuid>
required

The reference id of the GenerativeAI Provider Connection

resourceLevel
enum<string>
required

Scope for globally scoped resources.

Available options:
organisation
description
string
Example:

"LLM meaningful description"

modelGroup
enum<string>
Available options:
chat,
completion
isCustomModel
boolean
Example:

true

openAI
object

OpenAI specific meta data

anthropic
object

Anthropic specific meta data

azureOpenAI
object

Azure OpenAI specific meta data

googleVertexAI
object

Google VertexAI specific meta data

googleGemini
object

Google Gemini specific meta data

alephAlpha
object

Aleph Alpha specific meta data

openAICompatible
object

OpenAI compatible provider

assignedToProjects
string[]

MongoDB ObjectId representing a project

referenceId
string<uuid>

The reference id of the LargeLanguageModel

_id
string
Required string length: 24
createdAt
integer

Unix-timestamp

Required range: 0 <= x <= 2147483647
Example:

1694518620

lastChanged
integer

Unix-timestamp

Required range: 0 <= x <= 2147483647
Example:

1694518620

createdBy
string
Required string length: 24
lastChangedBy
string
Required string length: 24