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. Optional Idempotency-Key and X-Idempotency-Proof must be supplied together as independently generated 32–256 character URL-safe proofs. Save them before sending; an identical retry returns the original result. Wrong proof is 403, changed body is 409. Protected key recovery lasts 15 minutes; expired recovery never creates another resource.
The console's session cookie. Admin requests from the console also send x-console-request: 1.
In: cookie
Header Parameters
^[A-Za-z0-9_-]{32,256}$^[A-Za-z0-9_-]{32,256}$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
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 }, "property2": { "input": 0, "output": 0 } }, "status": "active", "createdAt": "string", "createdBy": "string" }}