Catalog AI Model Specs

Upsert AI Model version spec

Changed on

Creates or replaces the latest version's oas specification (upsert).

put/v1/ai-models/{aiModelId}/versions/latest/spec

Request

  • Base URL: https://global.api.konghq.com
  • URL: https://global.api.konghq.com/v1/ai-models/{aiModelId}/versions/latest/spec
  • Auth: one of:
    • HTTP bearer
    • HTTP bearer
    • HTTP bearer
    • HTTP bearer

Request body

spec_contentstring required

The raw content of the oas specification, in json or yaml format (for example, an OpenAPI document).

Example request

{
  "spec_content": "{\"openapi\":\"3.1.0\",\"info\":{\"title\":\"My AI Model\",\"version\":\"1.0.0\"},\"paths\":{}}",
  "spec_provider": {
    "source": "ai_gateway"
  }
}

Response

The replaced spec

spec_contentstring required

The raw content of the oas specification, in json or yaml format (for example, an OpenAPI document).

spec_type'oas' required

The type of specification document. Currently always oas (OpenAPI Specification).

created_atstring date-time required

An ISO-8601 timestamp representation of entity creation date.

updated_atstring date-time required

An ISO-8601 timestamp representation of entity update date.

Example response

{
  "spec_content": "{\"openapi\":\"3.1.0\",\"info\":{\"title\":\"My AI Model\",\"version\":\"1.0.0\"},\"paths\":{}}",
  "spec_type": "oas",
  "spec_provider": {
    "source": "ai_gateway"
  },
  "created_at": "2022-11-04T20:10:06.927Z",
  "updated_at": "2022-11-04T20:10:06.927Z"
}

Changes

    • breaking

      added to the / response property oneOf list for the response status

    • warning

      added the new key_invalid enum value to the ////// response property for the response status

    • warning

      added the new unique enum value to the ////// response property for the response status

    • info

      endpoint added