Create a BYOK credential
POST
/__remote/api.vercel.com/ai-gateway/byok-credentialsCreate a new BYOK credential
/__remote/api.vercel.com/ai-gateway/byok-credentials
const response = await fetch('/__remote/api.vercel.com/ai-gateway/byok-credentials?teamId=string&slug=string', { method: 'POST', headers: { 'Authorization': 'Bearer YOUR_ACCESS_TOKEN', 'Content-Type': 'application/json', }, body: JSON.stringify({ "ownerId": "example_id", "providerSlug": "example_id", "name": "Example Name", "active": "true", "zeroDataRetention": "true", "userId": "example_id", "mappings": [ { "gatewayModelSlug": "string", "customModelId": "example_id" } ] }),});
const data = await response.json();console.log(data);Response
{ "active": "false", "createdAt": "123", "credentialId": "example_id", "lastFourChars": "string", "name": "Example Name", "ownerId": "example_id", "providerSlug": "example_id", "updatedAt": "123", "zeroDataRetention": "false"}AuthorizationbearerToken
Default authentication mechanism
application/json
The owner ID for this credential. Ignored for customer tokens, which always create in their own team.
Whether the customer attested this external credential has a zero data retention policy
400One of the provided values in the request body is invalid.
401The request is not authorized.
403You do not have permission to access this resource.
404Error
410Error
429Error
500Error