Create a BYOK credential
POST
https://api.vercel.com/ai-gateway/byok-credentialsCreate a new BYOK credential
Request
import { Vercel } from "@vercel/sdk";
const vercel = new Vercel({ bearerToken: "<YOUR_BEARER_TOKEN_HERE>",});
async function run() { const result = await vercel.aiGateway.createAiGatewayByokCredential({ teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", slug: "my-team-url-slug", });
console.log(result);}
run();Response
{ "active": "false", "createdAt": "123", "credentialId": "example_id", "lastFourChars": "string", "name": "Example Name", "ownerId": "example_id", "providerSlug": "example_id", "rotatedAt": "123", "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