Create Credential
Add your own API key for a vendor (BYOK). The gateway calls the vendor with it as your organization’s key usage settings decide. An organization has one credential per vendor, so a second one is a 409. The key isn’t tested on save: send a request to a model on that vendor to check it. Needs a Pro or Enterprise plan.
Authentication
A management key (mgmt_...), sent as Authorization: Bearer <key>. Reading /v1/routing-policies also accepts the organization’s gateway API keys; writing there needs a management key.
Request
The vendor’s slug, like openai. Can’t change after creation: delete the credential and create a new one to switch vendors. An organization has at most one credential per vendor.
The vendor API key. Required except for vertexai (uses config.service_account_json) and bedrock (can use AWS keys or a role in config instead). Never returned.
Vendor-specific settings, such as the Bedrock region or the Vertex AI project.
When a request with this key fails, retry it once on Merge-managed access for the same vendor, if the organization has it.
Response
The non-secret vendor settings. Settings that aren’t set are null.
The last 4 characters of the stored API key, like a1b2, to tell keys apart. null when the credential has no API key, or the key is under 12 characters (4 would give away too much of it).
When a request with this key fails, retry it once on Merge-managed access for the same vendor, if the organization has it.
The vendor’s slug, like openai. Can’t change after creation: delete the credential and create a new one to switch vendors. An organization has at most one credential per vendor.