Store a provider credential
Creates one named provider instance. Supply exactly one direct provider secret or reusable providerGatewayId. The credential is stored as given and never probed: check one first with POST /v1/admin/providers/test. The slug defaults to the provider type and is unique among your provider instances, disabled ones included; only deleting an instance frees its slug.
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
application/json
curl -X POST "https://example.com/v1/admin/providers" \ -H "Content-Type: application/json" \ -d '{ "type": "openai", "name": "string" }'{ "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" }}List provider credentials
List provider credentials (GET /v1/admin/providers) in the App AI Gateway API. Accepts a management key, MCP OAuth token or console session.
Probe a provider credential without storing it
Probe a provider credential without storing it (POST /v1/admin/providers/test) in the App AI Gateway API.