Skip to main content

AI Assistant

Reference for the ai_assistant endpoints of the Surfmeter API.

Surfmeter API – AI Assistant v1

The Surfmeter API lets you manage clients, users, capabilities, measurements, and organization-wide settings programmatically.


Servers​

Description URL
https://surfmeter-server.{host}/client_admin_api/v1 https://surfmeter-server.{host}/client_admin_api/v1

AI Assistant​


GET /ai_assistant/status​

Input parameters

Parameter In Type Default Nullable Description
ApiKeyAuth header string N/A No API key used on every request. Create keys in the Surfmeter Dashboard under Keys → Surfmeter API Keys.

Response 200 OK

{
"enabled": true,
"data_owner": "string"
}

⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
"description": "Response for AI assistant status action",
"type": "object",
"required": [
"enabled",
"data_owner"
],
"properties": {
"enabled": {
"type": "boolean",
"description": "Whether AI assistant is enabled for this data owner"
},
"data_owner": {
"type": "string",
"description": "Name of the data owner"
}
}
}

POST /ai_assistant/explain_anomaly​

Input parameters

Parameter In Type Default Nullable Description
ApiKeyAuth header string N/A No API key used on every request. Create keys in the Surfmeter Dashboard under Keys → Surfmeter API Keys.

Response 200 OK


GET /ai_assistant/usage​

Input parameters

Parameter In Type Default Nullable Description
ApiKeyAuth header string N/A No API key used on every request. Create keys in the Surfmeter Dashboard under Keys → Surfmeter API Keys.

Response 200 OK

{
"usage": {
"total_tokens": 0,
"limit": 0,
"remaining": 0,
"percentage_used": 10.12,
"request_count": 0,
"conversation_count": 0
}
}

⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
"type": "object",
"required": [
"usage"
],
"properties": {
"usage": {
"type": "object",
"required": [
"total_tokens",
"limit",
"remaining",
"percentage_used",
"request_count",
"conversation_count"
],
"properties": {
"total_tokens": {
"type": "integer",
"description": "Total tokens used this month"
},
"limit": {
"type": "integer",
"description": "Monthly token limit for this data owner"
},
"remaining": {
"type": "integer",
"description": "Tokens remaining this month"
},
"percentage_used": {
"type": "number",
"description": "Percentage of monthly limit used"
},
"request_count": {
"type": "integer",
"description": "Total AI requests this month"
},
"conversation_count": {
"type": "integer",
"description": "Total unique conversations this month"
}
}
}
}
}

Schemas​

AiAssistantStatusResponse​

Name Type
data_owner string
enabled boolean

AiUsageResponse​

Name Type
usage Properties: total_tokens, limit, remaining, percentage_used, request_count, conversation_count

Security schemes​

<tr>
<td>ApiKeyAuth</td>
<td>apiKey</td>
<td></td>
<td>API key used on every request. Create keys in the Surfmeter Dashboard

under Keys → Surfmeter API Keys.

</tbody>
Name Type Scheme Description