Get prompts summary with filters
Returns summary statistics for prompts matching the given filters. When no filters are provided, returns the total count across all prompts.
```Python Python
import requests
url = "https://api.respan.ai/api/prompts/summary/"
api_key = "YOUR_RESPAN_API_KEY"
headers = {
"Authorization": f"Bearer {api_key}",
"Content-Type": "application/json"
}
data = {
"filters": {
"name": {
"operator": "icontains",
"value": "support"
}
}
}
response = requests.post(url, headers=headers, json=data)
print(response.json())
```
```TypeScript TypeScript
fetch('https://api.respan.ai/api/prompts/summary/', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer YOUR_RESPAN_API_KEY'
},
body: JSON.stringify({
filters: {
name: {
operator: 'icontains',
value: 'support'
}
}
})
})
.then(response => response.json())
.then(data => console.log(data));
```
Authentication
AuthorizationBearer
API key authentication. Get your API key from https://platform.respan.ai/platform/api-keys
Request
This endpoint expects an object.
filters
Filter criteria for prompts
Response
Summary statistics for prompts matching filters
total_count
Total number of prompts matching filters
Errors
401
Unauthorized Error