AppAIGatewayDocs
API referenceAdmin providers

Update, rotate or disable a provider credential

PUT
/v1/admin/providers/{id}

Requires the revision returned by the provider read this edit is based on; a stale revision returns 409 conflict. Sending status disables or re-enables the instance. Disabling keeps the secret, the pricing and the slug, so requests to it fail with provider_disabled and no other instance can take its slug meanwhile. Re-enabling does not require reclaiming the slug. Sending a non-null baseUrl also requires secret in the same request: the stored key is write-only and is never decrypted to be sent to an origin it has not been sent to before, so a move carries the key it is to be used with. Sending baseUrl: null returns the instance to its provider type's own origin and needs nothing else.

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

Path Parameters

id*string

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 PUT "https://example.com/v1/admin/providers/string" \  -H "Content-Type: application/json" \  -d '{    "revision": 1  }'
{  "provider": {    "id": "string",    "type": "openai",    "slug": "string",    "name": "string",    "secretHint": "string",    "providerGatewayId": "string",    "gatewayRoute": {      "modelPrefix": "string",      "providerOnly": [        "string"      ]    },    "baseUrl": "string",    "pricing": {      "property1": {        "input": 0,        "output": 0,        "cached_input": 0,        "cache_write": 0,        "cache_write_1h": 0,        "image_input": 0,        "audio_input": 0,        "video_input": 0,        "image_output": 0,        "long_input": 0,        "long_output": 0,        "long_cached_input": 0,        "long_cache_write": 0,        "long_cache_write_1h": 0,        "long_context_threshold": 1      },      "property2": {        "input": 0,        "output": 0,        "cached_input": 0,        "cache_write": 0,        "cache_write_1h": 0,        "image_input": 0,        "audio_input": 0,        "video_input": 0,        "image_output": 0,        "long_input": 0,        "long_output": 0,        "long_cached_input": 0,        "long_cache_write": 0,        "long_cache_write_1h": 0,        "long_context_threshold": 1      }    },    "route": "direct",    "capability": {      "apiStyles": [        "responses"      ],      "endpointStyles": [        "responses"      ],      "modelPrefix": "string",      "paths": "provider"    },    "revision": 1,    "status": "active",    "createdAt": "string",    "createdBy": "string"  }}