Save an AI provider credential
PUT
/api/v1/ai/credentials/{provider}
const url = 'https://example.com/api/v1/ai/credentials/claude';const options = { method: 'PUT', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"credential":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://example.com/api/v1/ai/credentials/claude \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "credential": "example" }'Save an AI provider credential for the caller. The server encrypts the credential before it stores it and returns no response body. Route: /api/v1/ai/credentials/{provider}. Inputs: provider. Do not automatically replay this operation after an uncertain result.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”provider
required
The official coding Agent selected by a prompt mention.
string
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
credential
required
Provider subscription access token accepted by the official CLI.
string
Examplegenerated
{ "credential": "example"}Responses
Section titled “Responses”Encrypted provider credential saved
Media typeapplication/json
The standard API error response: { "error": { ... } }.
object
Example
{ "error": { "code": "bad_request" }}Media typeapplication/json
The standard API error response: { "error": { ... } }.
object
Example
{ "error": { "code": "bad_request" }}Media typeapplication/json
The standard API error response: { "error": { ... } }.
object
Example
{ "error": { "code": "bad_request" }}