Skip to Content
kosemdocs
ReferenceAPIModels

Batch create models

Creates several models of an organization at once, or none if one of them cannot be created. Sharing them with projects (availability) also takes llmgateway.models.setAvailability.

POST
/v1/organizations/{organization}/models/batch-create

Creates several models of an organization at once, or none if one of them cannot be created.

Sharing them with projects (availability) also takes llmgateway.models.setAvailability.

Authorization

bearer
headerAuthorizationBearer <token>

An access token, or an API key.

Path Parameters

organization*string

The organization's ID.

Match^org_[0-7][0-9a-hjkmnp-tv-z]{25}$

Request Body

application/json
  1. body
models*array<>

The models to create, at most 100.

Items1 <= items <= 100

Response Body

Created

application/json
  1. response
models*array<>

The models created, in the order asked for.

Example Request
curl -X POST 'https://api.kosem.ai/v1/organizations/string/models/batch-create' \
  -H 'Content-Type: application/json' \
  -d '{
  "models": [
    {}
  ]
}'
Example Response
{
  "models": [
    {
      "alias": "string",
      "availability": {
        "allProjects": true,
        "projects": [
          "string"
        ]
      },
      "createTime": "2019-08-24T14:15:22Z",
      "displayName": "string",
      "formats": [
        "ANTHROPIC_MESSAGES"
      ],
      "info": {
        "contextWindow": 0,
        "deprecated": true,
        "displayName": "string",
        "inputs": [
          "string"
        ],
        "maxInputTokens": 0,
        "maxOutputTokens": 0,
        "pricing": {
          "cacheRead": {
            "currencyCode": "string",
            "nanos": -999999999,
            "units": 0
          },
          "cacheWrite": {
            "currencyCode": "string",
            "nanos": -999999999,
            "units": 0
          },
          "input": {
            "currencyCode": "string",
            "nanos": -999999999,
            "units": 0
          },
          "output": {
            "currencyCode": "string",
            "nanos": -999999999,
            "units": 0
          }
        },
        "reasoning": true,
        "reasoningEfforts": [
          "string"
        ],
        "structuredOutput": true,
        "toolCalls": true
      },
      "name": "string",
      "nativeFormats": [
        "ANTHROPIC_MESSAGES"
      ],
      "pricing": {
        "cacheRead": {
          "currencyCode": "string",
          "nanos": -999999999,
          "units": 0
        },
        "cacheWrite": {
          "currencyCode": "string",
          "nanos": -999999999,
          "units": 0
        },
        "input": {
          "currencyCode": "string",
          "nanos": -999999999,
          "units": 0
        },
        "output": {
          "currencyCode": "string",
          "nanos": -999999999,
          "units": 0
        },
        "pricedLike": {
          "provider": "string",
          "providerModel": "string"
        }
      },
      "provider": "string",
      "providerModel": "string",
      "providerType": "string",
      "source": "string",
      "state": "ACTIVE",
      "stateReason": "string",
      "updateTime": "2019-08-24T14:15:22Z"
    }
  ]
}