Inspect key access and account identity
Read ShareAI API key information to check model and provider restrictions and the account identity associated with an inference credential.
On this page
https://api.shareai.now/api/v1/iam/key/infoInspect the current inference credential.
- Base URL
https://api.shareai.now- Authentication
- Bearer API key or supported OAuth access token
cURL
curl --fail-with-body --request GET \
"https://api.shareai.now/api/v1/iam/key/info" \
-H "Authorization: Bearer $SHAREAI_API_KEY"
Python
import json
import os
import urllib.request
headers = {"Authorization": "Bearer " + os.environ["SHAREAI_API_KEY"]}
request = urllib.request.Request('https://api.shareai.now/api/v1/iam/key/info', headers=headers, method='GET')
with urllib.request.urlopen(request, timeout=60) as response:
print(json.load(response))
TypeScript
const url = "https://api.shareai.now/api/v1/iam/key/info";
const headers: Record = {
Authorization: `Bearer ${process.env.SHAREAI_API_KEY}`,
};
const response = await fetch(url, { method: "GET", headers });
if (!response.ok) throw new Error(`${response.status}: ${await response.text()}`);
console.log(await response.json());
Check access restrictions#
The response includes an access object with model and provider identifiers and restriction flags. Use these fields to explain an access-denied response. An unrestricted list and an explicitly restricted list are different policies; do not infer permission from a display label alone.
OAuth identity#
For OAuth, the public account identity is scoped to the application client. Treat account and optional provider subjects as opaque. Do not substitute internal numeric user or organization IDs.
Use the correct workspace#
If a key appears to belong to the wrong workspace, return to Console and select the intended personal or organization workspace before creating or changing a key. A different browser workspace does not silently change a previously issued credential.
Troubleshooting#
A successful key-information request checks credential access at that moment. It does not guarantee that a particular model has live capacity or that a later paid request will pass every admission check.
Last updated September 15, 2026