Mint a capability
Mint a scoped, short-lived token (e.g. for an agent) from a secret key.
POST
/v1/capabilitiesRequest body
requiredapplication/jsoncanstring[]Allowed model aliases.
syncGroupsstring[]ttlSecondsintegerResponses
201The minted capability (token shown once).
objectstringidstringtokenstring | nullShown once at creation.
canstring[]syncGroupsstring[]expiresAtinteger403The presented key cannot mint this scope.
typestringrequiredCoarse error class (e.g. `AbloValidationError`, `AbloPermissionError`).
codestringStable machine code for the specific error.
paramstringOffending model/field path, when parameter-specific.
messagestringrequiredHuman-readable explanation.
doc_urlstringLink to the docs page for this code.
request_idstringRequest correlation id, echoed on the `x-request-id` response header.
Request
curl -X POST "https://api.abloatai.com/api/v1/capabilities" \
-H "Content-Type: application/json" \
-d '{
"can": [
"string"
],
"syncGroups": [
"string"
],
"ttlSeconds": 0
}'const response = await fetch("https://api.abloatai.com/api/v1/capabilities", {
method: "POST",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify({
"can": [
"string"
],
"syncGroups": [
"string"
],
"ttlSeconds": 0
})
});import requests
response = requests.post(
"https://api.abloatai.com/api/v1/capabilities",
headers={
"Content-Type": "application/json"
},
json={
"can": [
"string"
],
"syncGroups": [
"string"
],
"ttlSeconds": 0
},
)Response
{
"object": "capability",
"id": "string",
"token": "string",
"can": [
"string"
],
"syncGroups": [
"string"
],
"expiresAt": 0
}{
"type": "string",
"code": "string",
"param": "string",
"message": "string",
"doc_url": "string",
"request_id": "string"
}