POST
/
v4
/
model-groups
/
{model_group_id}
/
models
/
{model_instance_id}
import SGPClient from 'sgp';

const client = new SGPClient({
  apiKey: process.env['SGP_API_KEY'], // This is the default and can be omitted
});

async function main() {
  const modelInstance = await client.modelGroups.models.create('model_group_id', 'model_instance_id');

  console.log(modelInstance.id);
}

main();
{
  "name": "<string>",
  "display_name": "<string>",
  "model_vendor": "OPENAI",
  "model_type": "COMPLETION",
  "base_model_id": "<string>",
  "base_model_metadata": {
    "ui_model_section_type": "PARTNER",
    "model_developer": "<string>",
    "model_license_url": "<string>",
    "delivery_date": "<string>",
    "modelDetails": {
      "number_of_parameters": 123,
      "token_context_window": 123,
      "languages": 123,
      "alignments": 123
    }
  },
  "model_creation_parameters": {},
  "model_card": "<string>",
  "training_data_card": "<string>",
  "description": "<string>",
  "model_template_id": "<string>",
  "model_group_id": "<string>",
  "id": "<string>",
  "created_at": "2023-11-07T05:31:56Z",
  "account_id": "<string>",
  "created_by_user_id": "<string>",
  "request_schema": {},
  "response_schema": {},
  "deployment_count": 123,
  "supports_multi_turn": true
}

Authorizations

x-api-key
string
header
required

Path Parameters

model_group_id
string
required
model_instance_id
string
required

Response

200
application/json
Successful Response
name
string
required
model_type
enum<string>
required

An enum representing the different types of models supported.

Attributes: COMPLETION: Denotes that the model type is completion. CHAT_COMPLETION: Denotes that the model type is chat completion. AGENT: Denotes that the model type is agent. EMBEDDING: Denotes that the model type is embedding. RERANKING: Denotes that the model type is reranking. GENERIC: Denotes that the model type is generic.

Available options:
COMPLETION,
CHAT_COMPLETION,
AGENT,
EMBEDDING,
RERANKING,
GENERIC
id
string
required

The unique identifier of the entity.

created_at
string
required

The date and time when the entity was created in ISO format.

account_id
string
required

The ID of the account that owns the given entity.

created_by_user_id
string
required

The user who originally created the entity.

request_schema
object
required

JSON schema for the requests to the model instance

response_schema
object
required

JSON schema for the response to the model

deployment_count
integer
required

Number of deployments of this model instance

supports_multi_turn
boolean
required

True if a model supports multi-turn conversations natively

display_name
string
model_vendor
enum<string>

An enum representing the different types of model vendors supported.

Attributes: OPENAI: Denotes that the model vendor is OpenAI. COHERE: Denotes that the model vendor is Cohere. GOOGLE: Denotes that the model vendor is Google. ANTHROPIC: Denotes that the model vendor is Anthropic. LLMENGINE: Denotes that the model vendor is LLM Engine. OTHER: Denotes that the model vendor is Other.

Available options:
OPENAI,
COHERE,
GOOGLE,
VERTEX_AI,
ANTHROPIC,
LAUNCH,
LLMENGINE,
BEDROCK,
OTHER
base_model_id
string
base_model_metadata
object
model_creation_parameters
object
model_card
string
training_data_card
string
description
string
model_template_id
string
model_group_id
string