AppAIGatewayDocs
API referenceAdmin provider gateways

Create a reusable provider gateway connection

POST
/v1/admin/provider-gateways

Cloudflare AI Gateway takes an account and gateway id; Vercel AI Gateway takes only a name and a token. The token is encrypted and stored as given, never probed: check a connection first with POST /v1/admin/provider-gateways/test. Provider instances are attached separately through the providers API.

Authorization

agw_identity_auth.session_token<token>

The console's session cookie. Admin requests from the console also send x-console-request: 1.

In: cookie

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/admin/provider-gateways" \  -H "Content-Type: application/json" \  -d '{    "type": "cf_aig",    "name": "string",    "token": "string",    "accountId": "string",    "gatewayId": "string"  }'
{  "gateway": {    "id": "string",    "name": "string",    "secretHint": "string",    "providerCount": 0,    "referencedCount": 0,    "revision": 1,    "status": "active",    "createdAt": "string",    "updatedAt": "string",    "createdBy": "string",    "type": "cf_aig",    "config": {      "accountId": "string",      "gatewayId": "string"    }  }}