AI Gateway Datastores

Create an AI Gateway Datastore

Changed on

Creates a new Datastore for the AI Gateway.

post/v1/ai-gateways/{gatewayId}/datastores

Request

  • Base URL
    https://global.api.konghq.com
  • Auth
    • HTTP bearer
    • or HTTP bearer
    • or HTTP bearer
    • or HTTP bearer

Path parameters

gatewayId, string uuid required

Contains a unique identifier used for this resource.

Example:5f9fd312-a987-4628-b4c5-bb4f4fddd5f7

The unique ID of the AI Gateway.

Request body

union required

Configuration for an AI Gateway Datastore.

RedisCEDatastore required
OR
RedisEEDatastore required
OR
VectorDBDatastore required

Carries the pgvector connection only. strategy, dimensions, distance_metric, and threshold belong to the policy or model referencing this Datastore, not the Datastore itself.

OR
TokenVaultDatastore required

Example request

{
  "name": "shared-redis",
  "display_name": "Shared Redis",
  "description": "Redis shared by rate limiting and semantic cache",
  "labels": {
    "category": "finance"
  },
  "managed_by": {
    "owner": "terraform"
  },
  "config": {
    "host": "127.0.0.1",
    "cloud_authentication": {
      "auth_provider": "{vault://hcv/redis/auth_provider}"
    }
  }
}

Response

AI Gateway Datastore created successfully.

union required

Configuration for an AI Gateway Datastore.

intersection required
OR
intersection required
OR
intersection required
OR
intersection required

Example response

{
  "id": "5f9fd312-a987-4628-b4c5-bb4f4fddd5f7",
  "created_at": "2022-11-04T20:10:06.927Z",
  "updated_at": "2022-11-04T20:10:06.927Z",
  "konnect_managed": true,
  "name": "shared-redis",
  "display_name": "Shared Redis",
  "description": "Redis shared by rate limiting and semantic cache",
  "labels": {
    "category": "finance"
  },
  "managed_by": {
    "owner": "terraform"
  },
  "config": {
    "host": "127.0.0.1",
    "cloud_authentication": {
      "auth_provider": "{vault://hcv/redis/auth_provider}"
    }
  }
}

Changes