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
  • Auth
    • HTTP bearer
    • or HTTP bearer
    • or HTTP bearer
    • or HTTP bearer

Path parameters

aiModelId, string uuid required
Example:123e4567-e89b-12d3-a456-426614174000

The unique identifier of the AI Model.

Request body

AiModelVersionSpecWrite required

Request body for creating or replacing a version's spec (upsert). The request body has a maximum size limit of 8MB.

spec_content, string required

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

spec_provider, SpecProvider nullable

Optional provenance. Omit (or null) for a user-uploaded specification.

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

AiModelVersionSpec required

The oas specification document for an AI Model version.

spec_content, string 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).

spec_provider, object nullable

Provenance of the specification. null (or absent) for a user-uploaded specification.

created_at, string date-time required

An ISO-8601 timestamp representation of entity creation date.

updated_at, string 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

    • info

      the spec_type response property const value oas was added for the status

    • info

      the spec_type response property const value oas was added for the status

    • info

      removed the oas enum value from the spec_type response property for the response status

    1 more change in this revision