Get errors by dimension
https://api.respan.ai/api/pulses/errors/grouped/Splits failed spans by a field, such as model or customer. The signals panel narrows by a group’s error_class, provider and status for its “Errors by model” and “Errors by customer” splits; groups that differ only by endpoint count together.
Servers
https://api.respan.ai: Respan API Server
Authentication
RespanApiKey
Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.
HTTP scheme: bearer; format: Respan API key.
Authorization: Bearer $RESPAN_API_KEYRequest body
A request body is required.
application/json
$ object Required body
filters narrow the same field, filters wins.Reference:
#/components/schemas/ErrorBreakdownRequestgroup_by string Required in parentissue groups by error group fingerprint, provider by provider ID, and status by HTTP status code.Allowed:
"customer_identifier", "deployment_name", "endpoint", "error_class", "fault_domain", "issue", "model", "provider", "status"Example:
"model"start_time string OptionalFormat:
date-timeExample:
"2026-09-24T00:00:00Z"end_time string OptionalFormat:
date-timeExample:
"2026-10-01T00:00:00Z"environment string Optionalprod or test. Omit it to include every environment.Example:
"prod"limit integer OptionalDefault:
100Minimum:
1Maximum:
100Example:
10error_class string Optional
is not, use filters.error_class (allOf 1) string Schema variantReference:
#/components/schemas/ErrorClassAllowed:
"user_invalid_request", "user_auth_byok", "user_quota", "user_rate_limit", "user_content_policy", "user_context_window", "user_payload_too_large", "provider_down", "provider_overloaded", "provider_timeout", "provider_rate_limit", "respan_managed_auth", "respan_managed_billing", "respan_config", "respan_internal", "network_transient", "client_cancelled", "unknown"Example:
"provider_rate_limit"fault_domain string Optionalnone selects client cancellations.Allowed:
"user", "respan", "provider", "none"Example:
"provider"provider string OptionalExample:
"openai"status integer OptionalExample:
429filters object Optional
Reference:
#/components/schemas/ErrorGroupFiltersAdditional properties are not allowed
Example:
{"fault_domain":{"operator":"","value":["provider","respan"]}}filters.error_class object Optional
#/components/schemas/ErrorGroupFilterConditionfilters.error_class.operator string Optional"" (is any of), not (is none of), in, empty or not_empty. Allowed operators per key: error_class and fault_domain take "", not, in; provider_id takes "", not, empty, not_empty; status_code takes "", not.Allowed:
"", "not", "in", "empty", "not_empty"Default: “
Example:
""filters.error_class.value string or integer or array<string or integer> Optional
operator is empty or not_empty.Example:
["provider_rate_limit","provider_overloaded"]filters.error_class.value (oneOf 1) string Schema variantfilters.error_class.value (oneOf 2) integer Schema variantfilters.error_class.value (oneOf 3) array<string or integer> Schema variant
filters.error_class.value (oneOf 3)[] string or integer Array item
filters.error_class.value (oneOf 3)[] (oneOf 1) string Schema variantfilters.error_class.value (oneOf 3)[] (oneOf 2) integer Schema variantfilters.fault_domain object Optional
#/components/schemas/ErrorGroupFilterConditionfilters.fault_domain.operator string Optional"" (is any of), not (is none of), in, empty or not_empty. Allowed operators per key: error_class and fault_domain take "", not, in; provider_id takes "", not, empty, not_empty; status_code takes "", not.Allowed:
"", "not", "in", "empty", "not_empty"Default: “
Example:
""filters.fault_domain.value string or integer or array<string or integer> Optional
operator is empty or not_empty.Example:
["provider_rate_limit","provider_overloaded"]filters.fault_domain.value (oneOf 1) string Schema variantfilters.fault_domain.value (oneOf 2) integer Schema variantfilters.fault_domain.value (oneOf 3) array<string or integer> Schema variant
filters.fault_domain.value (oneOf 3)[] string or integer Array item
filters.fault_domain.value (oneOf 3)[] (oneOf 1) string Schema variantfilters.fault_domain.value (oneOf 3)[] (oneOf 2) integer Schema variantfilters.provider_id object Optional
#/components/schemas/ErrorGroupFilterConditionfilters.provider_id.operator string Optional"" (is any of), not (is none of), in, empty or not_empty. Allowed operators per key: error_class and fault_domain take "", not, in; provider_id takes "", not, empty, not_empty; status_code takes "", not.Allowed:
"", "not", "in", "empty", "not_empty"Default: “
Example:
""filters.provider_id.value string or integer or array<string or integer> Optional
operator is empty or not_empty.Example:
["provider_rate_limit","provider_overloaded"]filters.provider_id.value (oneOf 1) string Schema variantfilters.provider_id.value (oneOf 2) integer Schema variantfilters.provider_id.value (oneOf 3) array<string or integer> Schema variant
filters.provider_id.value (oneOf 3)[] string or integer Array item
filters.provider_id.value (oneOf 3)[] (oneOf 1) string Schema variantfilters.provider_id.value (oneOf 3)[] (oneOf 2) integer Schema variantfilters.status_code object Optional
#/components/schemas/ErrorGroupFilterConditionfilters.status_code.operator string Optional"" (is any of), not (is none of), in, empty or not_empty. Allowed operators per key: error_class and fault_domain take "", not, in; provider_id takes "", not, empty, not_empty; status_code takes "", not.Allowed:
"", "not", "in", "empty", "not_empty"Default: “
Example:
""filters.status_code.value string or integer or array<string or integer> Optional
operator is empty or not_empty.Example:
["provider_rate_limit","provider_overloaded"]filters.status_code.value (oneOf 1) string Schema variantfilters.status_code.value (oneOf 2) integer Schema variantfilters.status_code.value (oneOf 3) array<string or integer> Schema variant
filters.status_code.value (oneOf 3)[] string or integer Array item
filters.status_code.value (oneOf 3)[] (oneOf 1) string Schema variantfilters.status_code.value (oneOf 3)[] (oneOf 2) integer Schema variantOpenAPI request schema
{
"$ref": "#/components/schemas/ErrorBreakdownRequest"
}Example
{
"group_by": "model",
"start_time": "2026-09-30T00:00:00Z",
"end_time": "2026-10-01T00:00:00Z",
"error_class": "provider_rate_limit",
"provider": "openai",
"status": 429,
"limit": 10
}Responses
200
Failed spans per group.
application/json
$ object Body
#/components/schemas/ErrorBreakdowngroup_by string Required in parent"customer_identifier", "deployment_name", "endpoint", "error_class", "fault_domain", "issue", "model", "provider", "status"Example:
"model"groups array<object> Required in parent
count, highest first.groups[] object Array item
#/components/schemas/ErrorBreakdownGroupgroups[].group_value string or integer Required in parent
group_by field: an integer for status, else a string. Missing values are an empty string.Example:
"gpt-4o"groups[].group_value (oneOf 1) string Schema variantgroups[].group_value (oneOf 2) integer Schema variantgroups[].count integer Required in parentExample:
212OpenAPI response schema
{
"$ref": "#/components/schemas/ErrorBreakdown"
}Example
{
"group_by": "model",
"groups": [
{
"group_value": "gpt-4o",
"count": 212
},
{
"group_value": "gpt-4o-mini",
"count": 106
}
]
}400
Invalid group_by or filters.
application/json
$ object BodyOpenAPI response schema
{
"type": "object",
"additionalProperties": true
}Example
{
"error": "group_by must be one of ['customer_identifier', 'deployment_name', 'endpoint', 'error_class', 'fault_domain', 'issue', 'model', 'provider', 'status']"
}403
Forbidden: the API key is missing, invalid or expired; the key doesn’t grant logs:read (Read access does).
application/json
$ object Body
detail string Required in parentOpenAPI response schema
{
"type": "object",
"required": [
"detail"
],
"properties": {
"detail": {
"type": "string"
}
}
}Missing or invalid API key
{
"detail": "Your API key is invalid or expired, please check your API key in the platform settings."
}Key lacks the permission
{
"detail": "This API key does not have the 'logs:read' permission."
}429
Rate limited. This endpoint allows 60 requests per minute per organization.
application/json
$ object Body
detail string Required in parentOpenAPI response schema
{
"type": "object",
"required": [
"detail"
],
"properties": {
"detail": {
"type": "string"
}
}
}Example
{
"detail": "Request was throttled."
}OpenAPI source
The operation and referenced components below retain the complete OpenAPI definitions, including constraints and examples.
OpenAPI operation
{
"summary": "Get errors by dimension",
"operationId": "getErrorBreakdown",
"tags": [
"Error Groups"
],
"description": "Splits failed spans by a field, such as model or customer. The signals panel narrows by a group's `error_class`, `provider` and `status` for its \"Errors by model\" and \"Errors by customer\" splits; groups that differ only by endpoint count together.",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorBreakdownRequest"
},
"example": {
"group_by": "model",
"start_time": "2026-09-30T00:00:00Z",
"end_time": "2026-10-01T00:00:00Z",
"error_class": "provider_rate_limit",
"provider": "openai",
"status": 429,
"limit": 10
}
}
}
},
"responses": {
"200": {
"description": "Failed spans per group.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorBreakdown"
},
"example": {
"group_by": "model",
"groups": [
{
"group_value": "gpt-4o",
"count": 212
},
{
"group_value": "gpt-4o-mini",
"count": 106
}
]
}
}
}
},
"400": {
"description": "Invalid `group_by` or `filters`.",
"content": {
"application/json": {
"schema": {
"type": "object",
"additionalProperties": true
},
"example": {
"error": "group_by must be one of ['customer_identifier', 'deployment_name', 'endpoint', 'error_class', 'fault_domain', 'issue', 'model', 'provider', 'status']"
}
}
}
},
"403": {
"description": "Forbidden: the API key is missing, invalid or expired; the key doesn't grant `logs:read` (Read access does).",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"detail"
],
"properties": {
"detail": {
"type": "string"
}
}
},
"examples": {
"invalidKey": {
"summary": "Missing or invalid API key",
"value": {
"detail": "Your API key is invalid or expired, please check your API key in the platform settings."
}
},
"missingPermission": {
"summary": "Key lacks the permission",
"value": {
"detail": "This API key does not have the 'logs:read' permission."
}
}
}
}
}
},
"429": {
"description": "Rate limited. This endpoint allows 60 requests per minute per organization.",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"detail"
],
"properties": {
"detail": {
"type": "string"
}
}
},
"example": {
"detail": "Request was throttled."
}
}
}
}
},
"security": [
{
"RespanApiKey": []
}
]
}OpenAPI path metadata
{}Referenced OpenAPI components
{
"schemas": {
"ErrorBreakdown": {
"type": "object",
"required": [
"group_by",
"groups"
],
"properties": {
"group_by": {
"type": "string",
"enum": [
"customer_identifier",
"deployment_name",
"endpoint",
"error_class",
"fault_domain",
"issue",
"model",
"provider",
"status"
],
"example": "model"
},
"groups": {
"type": "array",
"description": "Groups ordered by `count`, highest first.",
"items": {
"$ref": "#/components/schemas/ErrorBreakdownGroup"
}
}
}
},
"ErrorBreakdownGroup": {
"type": "object",
"required": [
"group_value",
"count"
],
"properties": {
"group_value": {
"description": "Value of the `group_by` field: an integer for `status`, else a string. Missing values are an empty string.",
"oneOf": [
{
"type": "string"
},
{
"type": "integer"
}
],
"example": "gpt-4o"
},
"count": {
"type": "integer",
"description": "Failed spans with this value.",
"example": 212
}
}
},
"ErrorBreakdownRequest": {
"type": "object",
"required": [
"group_by"
],
"description": "When a flat key and `filters` narrow the same field, `filters` wins.",
"properties": {
"group_by": {
"type": "string",
"enum": [
"customer_identifier",
"deployment_name",
"endpoint",
"error_class",
"fault_domain",
"issue",
"model",
"provider",
"status"
],
"description": "Field to group by. `issue` groups by error group fingerprint, `provider` by provider ID, and `status` by HTTP status code.",
"example": "model"
},
"start_time": {
"type": "string",
"format": "date-time",
"description": "Start of the range, ISO 8601. A time without an offset is read as UTC. Defaults to 7 days ago, which is also used if the value can't be parsed.",
"example": "2026-09-24T00:00:00Z"
},
"end_time": {
"type": "string",
"format": "date-time",
"description": "End of the range, ISO 8601. A time without an offset is read as UTC. Defaults to now, which is also used if the value can't be parsed.",
"example": "2026-10-01T00:00:00Z"
},
"environment": {
"type": "string",
"description": "Only count spans from this environment, such as `prod` or `test`. Omit it to include every environment.",
"example": "prod"
},
"limit": {
"type": "integer",
"minimum": 1,
"maximum": 100,
"default": 100,
"description": "Maximum groups to return. Values above 100 are capped at 100.",
"example": 10
},
"error_class": {
"allOf": [
{
"$ref": "#/components/schemas/ErrorClass"
}
],
"description": "Only this error class. For several values or `is not`, use `filters`."
},
"fault_domain": {
"type": "string",
"enum": [
"user",
"respan",
"provider",
"none"
],
"description": "Only errors with this fault. `none` selects client cancellations.",
"example": "provider"
},
"provider": {
"type": "string",
"description": "Only errors from this provider ID.",
"example": "openai"
},
"status": {
"type": "integer",
"description": "Only errors with this HTTP status code.",
"example": 429
},
"filters": {
"$ref": "#/components/schemas/ErrorGroupFilters"
}
}
},
"ErrorClass": {
"type": "string",
"enum": [
"user_invalid_request",
"user_auth_byok",
"user_quota",
"user_rate_limit",
"user_content_policy",
"user_context_window",
"user_payload_too_large",
"provider_down",
"provider_overloaded",
"provider_timeout",
"provider_rate_limit",
"respan_managed_auth",
"respan_managed_billing",
"respan_config",
"respan_internal",
"network_transient",
"client_cancelled",
"unknown"
],
"description": "Normalized cause of the failure, assigned when the span is stored.",
"example": "provider_rate_limit"
},
"ErrorGroupFilterCondition": {
"type": "object",
"properties": {
"operator": {
"type": "string",
"enum": [
"",
"not",
"in",
"empty",
"not_empty"
],
"default": "",
"description": "`\"\"` (is any of), `not` (is none of), `in`, `empty` or `not_empty`. Allowed operators per key: `error_class` and `fault_domain` take `\"\"`, `not`, `in`; `provider_id` takes `\"\"`, `not`, `empty`, `not_empty`; `status_code` takes `\"\"`, `not`.",
"example": ""
},
"value": {
"description": "One value or a list. Required unless `operator` is `empty` or `not_empty`.",
"oneOf": [
{
"type": "string"
},
{
"type": "integer"
},
{
"type": "array",
"items": {
"oneOf": [
{
"type": "string"
},
{
"type": "integer"
}
]
}
}
],
"example": [
"provider_rate_limit",
"provider_overloaded"
]
}
}
},
"ErrorGroupFilters": {
"type": "object",
"description": "Narrow the errors with the same filter shape as the Logs filter bar. Only these four keys are accepted; any other key is a 400.",
"properties": {
"error_class": {
"$ref": "#/components/schemas/ErrorGroupFilterCondition"
},
"fault_domain": {
"$ref": "#/components/schemas/ErrorGroupFilterCondition"
},
"provider_id": {
"$ref": "#/components/schemas/ErrorGroupFilterCondition"
},
"status_code": {
"$ref": "#/components/schemas/ErrorGroupFilterCondition"
}
},
"additionalProperties": false,
"example": {
"fault_domain": {
"operator": "",
"value": [
"provider",
"respan"
]
}
}
}
},
"securitySchemes": {
"RespanApiKey": {
"type": "http",
"scheme": "bearer",
"bearerFormat": "Respan API key",
"description": "Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.",
"x-fern-bearer": {
"name": "respanApiKey",
"env": "RESPAN_API_KEY"
}
}
}
}