Search the AI call log
curl --request POST \
--url https://app.hookie.ai/admin/api/projects/{pid}/search/ai-calls \
--header 'Content-Type: application/json' \
--cookie hookie_session= \
--data '
{
"q": "<string>",
"source_id": "<string>",
"instance_id": "<string>",
"model": "<string>",
"since": "<string>",
"until": "<string>",
"limit": 25,
"offset": 0
}
'const options = {
method: 'POST',
headers: {cookie: 'hookie_session=', 'Content-Type': 'application/json'},
body: JSON.stringify({
q: '<string>',
source_id: '<string>',
instance_id: '<string>',
model: '<string>',
since: '<string>',
until: '<string>',
limit: 25,
offset: 0
})
};
fetch('https://app.hookie.ai/admin/api/projects/{pid}/search/ai-calls', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.hookie.ai/admin/api/projects/{pid}/search/ai-calls"
payload = {
"q": "<string>",
"source_id": "<string>",
"instance_id": "<string>",
"model": "<string>",
"since": "<string>",
"until": "<string>",
"limit": 25,
"offset": 0
}
headers = {
"cookie": "hookie_session=",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"entity": "ai_calls",
"count": 123,
"total": 123,
"limit": 123,
"offset": 123,
"results": [
{
"id": "<string>",
"source_kind": "trigger",
"source_id": "<string>",
"instance_id": "<string>",
"step": "<string>",
"model": "<string>",
"status": "ok",
"error": "<string>",
"input_tokens": 123,
"output_tokens": 123,
"tokens_estimated": true,
"latency_ms": 123,
"created_at": "2023-11-07T05:31:56Z",
"instructions_truncated": true,
"input_truncated": true,
"output_truncated": true,
"output_preview": "<string>"
}
]
}{
"error": "<string>",
"retry_after": 123,
"upgrade_url": "<string>"
}{
"error": "<string>",
"retry_after": 123,
"upgrade_url": "<string>"
}{
"error": "<string>",
"retry_after": 123,
"upgrade_url": "<string>"
}{
"error": "<string>",
"retry_after": 123,
"upgrade_url": "<string>"
}Search
Search the AI call log
Every AI call an AI trigger, workflow call_ai step or agent_call step made in this project, including calls refused for being over the monthly AI token allowance. Newest first. Lists carry a preview of the output; GET one call for the full texts. Top-level alias: POST /admin/api/search/ai-calls.
POST
/
admin
/
api
/
projects
/
{pid}
/
search
/
ai-calls
Search the AI call log
curl --request POST \
--url https://app.hookie.ai/admin/api/projects/{pid}/search/ai-calls \
--header 'Content-Type: application/json' \
--cookie hookie_session= \
--data '
{
"q": "<string>",
"source_id": "<string>",
"instance_id": "<string>",
"model": "<string>",
"since": "<string>",
"until": "<string>",
"limit": 25,
"offset": 0
}
'const options = {
method: 'POST',
headers: {cookie: 'hookie_session=', 'Content-Type': 'application/json'},
body: JSON.stringify({
q: '<string>',
source_id: '<string>',
instance_id: '<string>',
model: '<string>',
since: '<string>',
until: '<string>',
limit: 25,
offset: 0
})
};
fetch('https://app.hookie.ai/admin/api/projects/{pid}/search/ai-calls', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.hookie.ai/admin/api/projects/{pid}/search/ai-calls"
payload = {
"q": "<string>",
"source_id": "<string>",
"instance_id": "<string>",
"model": "<string>",
"since": "<string>",
"until": "<string>",
"limit": 25,
"offset": 0
}
headers = {
"cookie": "hookie_session=",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"entity": "ai_calls",
"count": 123,
"total": 123,
"limit": 123,
"offset": 123,
"results": [
{
"id": "<string>",
"source_kind": "trigger",
"source_id": "<string>",
"instance_id": "<string>",
"step": "<string>",
"model": "<string>",
"status": "ok",
"error": "<string>",
"input_tokens": 123,
"output_tokens": 123,
"tokens_estimated": true,
"latency_ms": 123,
"created_at": "2023-11-07T05:31:56Z",
"instructions_truncated": true,
"input_truncated": true,
"output_truncated": true,
"output_preview": "<string>"
}
]
}{
"error": "<string>",
"retry_after": 123,
"upgrade_url": "<string>"
}{
"error": "<string>",
"retry_after": 123,
"upgrade_url": "<string>"
}{
"error": "<string>",
"retry_after": 123,
"upgrade_url": "<string>"
}{
"error": "<string>",
"retry_after": 123,
"upgrade_url": "<string>"
}Authorizations
sessionbearerAuth
The console's sealed session cookie, set by WorkOS AuthKit. Mutating requests also require the X-Requested-With CSRF header.
Path Parameters
Project id (UUID) belonging to the caller workspace.
Body
application/json
All filters optional and ANDed.
Case-insensitive substring of the instructions, input or output.
Available options:
ok, error, quota_exceeded Available options:
trigger, workflow, agent ISO 8601 timestamp; matches created_at >= since.
ISO 8601 timestamp; matches created_at <= until.
Required range:
1 <= x <= 200Required range:
x >= 0