---
title: "ListAIRequestFailures"
method: GET
path: "/v1/namespaces/{tenant_meta.namespace}/ai-request-failures"
tags: ["AIRequestFailureService"]
---

# ListAIRequestFailures

`GET /v1/namespaces/{tenant_meta.namespace}/ai-request-failures`

## Request

- Base URL: `https://api.endorlabs.com`
- URL: `https://api.endorlabs.com/v1/namespaces/{tenant_meta.namespace}/ai-request-failures`
- Auth: none declared

Lists all AIRequestFailure visible for root namespace.

## Path parameters

- `tenant_meta.namespace` string, required

## Query parameters

- `list_parameters.filter` string
- `list_parameters.page_token` integer
- `list_parameters.page_size` integer
- `list_parameters.action` string
- `list_parameters.mask` string
- `list_parameters.traverse` boolean
- `list_parameters.sort.path` string
- `list_parameters.sort.order` 'SORT_ENTRY_ORDER_UNSPECIFIED' | 'SORT_ENTRY_ORDER_ASC' | 'SORT_ENTRY_ORDER_DESC'
- `list_parameters.count` boolean
- `list_parameters.group.aggregation_paths` string
- `list_parameters.group.show_aggregation_uuids` boolean
- `list_parameters.group.unique_count_paths` string
- `list_parameters.group.unique_value_paths` string
- `list_parameters.ci_run_uuid` string
- `list_parameters.page_id` string
- `list_parameters.group_by_time.aggregation_paths` string
- `list_parameters.group_by_time.show_aggregation_uuids` boolean
- `list_parameters.group_by_time.interval` 'GROUP_BY_TIME_INTERVAL_UNSPECIFIED' | 'GROUP_BY_TIME_INTERVAL_YEAR' | 'GROUP_BY_TIME_INTERVAL_QUARTER' | 'GROUP_BY_TIME_INTERVAL_MONTH' | 'GROUP_BY_TIME_INTERVAL_WEEK' | 'GROUP_BY_TIME_INTERVAL_DAY' | 'GROUP_BY_TIME_INTERVAL_HOUR' | 'GROUP_BY_TIME_INTERVAL_MINUTE' | 'GROUP_BY_TIME_INTERVAL_SECOND'
- `list_parameters.group_by_time.group_size` integer
- `list_parameters.group_by_time.start_time` string, date-time
- `list_parameters.group_by_time.end_time` string, date-time
- `list_parameters.group_by_time.mode` string
- `list_parameters.group_by_time.aggregation_value_field` string
- `list_parameters.group_by_time.aggregation_operator` string
- `list_parameters.disable_pagination` boolean

## Response `200`

A successful response.

- V1ListAIRequestFailuresResponse: Response to the request to list AIRequestFailure.
  - `count_response` V1CountResponse: Response to a list count request.
    - `count` integer: Number of objects matching the given list parameters.
  - `group_response` V1GroupResponse: Response to a list group request.
    - `groups` object: Map indexed by values of the fields specified in aggregation_paths, for example, {"[{"key":"meta.kind","value":"Project"}]": { "aggregation_count": { "count": 1649 } } }.
  - `list` V1ListAIRequestFailuresResponseList: List of AI request failures.
    - `objects` V1AIRequestFailure[]: List of AI request failures.
      - `meta` V1Meta, required: Common fields for all Endor Labs resources.
        - `annotations` object: Annotations can be used to attach metadata to a resource message. Annotation values can be small or large, structured or unstructured, and may include characters not permitted by labels. The keys may contain alphanumerics, underscores (_), dots (.) and dashes (-). The values of an annotation must be 16384 bytes or smaller.
        - `create_time` string, date-time: Time the resource was created. Format: 2017-01-15T01:30:15.01Z RFC 3339: https://www.ietf.org/rfc/rfc3339.txt.
        - `created_by` string: Name and authentication source of the user who created the object, for example, ewok@endor.ai@google@api-key.
        - `description` string: Resource description. Must be less than 1024 bytes.
        - `index_data` V1IndexData: IndexData is used to index the resource for search. It's an internal object.
          - `data` string[]
          - `search_score` number, float: search_score is the score of the resource for search. Internal use only.
          - `tenant` string
          - `will_be_deleted_at` string, date-time: Time that the resource will be deleted.
        - `kind` string: Resource kind, for example, HelloResponse. Auto-generated using the protobuf message proto.MessageName().Name().
        - `name` string, required: Resource name. Must be 63 characters or less.
        - `parent_kind` string: Parent object resource kind, for example, Project.
        - `parent_uuid` string: Parent object UUID.
        - `references` object: Map of objects referenced in a query API.
        - `tags` string[]: List of tags attached to the resource. Tags can be used to select objects and to find collections of objects that satisfy certain conditions. A tag must be 255 characters or less.
        - `update_time` string, date-time: Time the resource was last updated. Note: Updated on all create/patch/delete operations. Format: 2017-01-15T01:30:15.01Z RFC 3339: https://www.ietf.org/rfc/rfc3339.txt.
        - `updated_by` string: Name and authentication source of the last user who updated the object, for example, vulnerabilityingestor@endor.ai@x509.
        - `upsert_time` string, date-time: Time the resource was last upserted. Note: create_time is only set the first time the resource is created. upsert_time is set every time the resource is upseted. Format: 2017-01-15T01:30:15.01Z RFC 3339: https://www.ietf.org/rfc/rfc3339.txt.
        - `version` string: Message version.
      - `spec` V1AIRequestFailureSpec: The fields that describe one failed request.
        - `ai_feature` 'AI_FEATURE_UNSPECIFIED' | 'AI_FEATURE_SECURITY_REVIEW' | 'AI_FEATURE_AI_SAST' | 'AI_FEATURE_AIFP_EVALUATOR' | 'AI_FEATURE_LICENSE_EXTRACTION' | 'AI_FEATURE_MODEL_DISCOVERY' | 'AI_FEATURE_MODEL_METADATA_EXTRACTION' | 'AI_FEATURE_SKILL_SCORING' | 'AI_FEATURE_MCP_RISK_EVALUATION' | 'AI_FEATURE_AI_SAST_CONTEXT_SUMMARY' | 'AI_FEATURE_AGENT_POLICY_CMD_CLASSIFICATION' | 'AI_FEATURE_MALWARE_ANALYSIS': AIFeature identifies which AI feature is making the request. This is used for metrics, billing, and feature tracking. - AI_FEATURE_AI_SAST_CONTEXT_SUMMARY: AI SAST per-project context summarization that grounds segment prompts. - AI_FEATURE_AGENT_POLICY_CMD_CLASSIFICATION: Agent-governance adjudication of a command an agent hook policy flagged. - AI_FEATURE_MALWARE_ANALYSIS: Malware analysis of a published package version (ported sr-malware-detection LLM signals).
        - `attempt_count` integer: Provider calls the request made before it failed, retries included.
        - `credential_class` 'AI_CREDENTIAL_CLASS_UNSPECIFIED' | 'AI_CREDENTIAL_CLASS_PLATFORM' | 'AI_CREDENTIAL_CLASS_BYOK': AICredentialClass names the provider account an AI request billed against. It supersedes the byok boolean, which cannot name a third kind of account and cannot say which of a tenant's keys served a request. The value names carry a constraint. Lowercased and stripped of the AI_CREDENTIAL_CLASS_ prefix, each one must equal the credential-class label value the LLM metrics use, so a stored record and a metric series never name the same account differently. A rename breaks that pairing silently. - AI_CREDENTIAL_CLASS_UNSPECIFIED: No class was assigned, so the record predates credential classification. - AI_CREDENTIAL_CLASS_PLATFORM: Endor's own provider account served the request. - AI_CREDENTIAL_CLASS_BYOK: The tenant's own provider account served the request, reached through one of their AI provider keys.
        - `credential_ref` string: The uuid of the AI provider key the failed request ran on, unset unless the credential class is BYOK.
        - `duration_msec` number, float: Time the request ran before it failed, in milliseconds.
        - `embedding_model` 'EMBEDDING_MODEL_UNSPECIFIED' | 'EMBEDDING_MODEL_OPENAI_TEXT_EMBEDDING_ADA_002' | 'EMBEDDING_MODEL_OPENAI_TEXT_EMBEDDING_3_SMALL' | 'EMBEDDING_MODEL_GOOGLE_TEXT_EMBEDDING_LARGE' | 'EMBEDDING_MODEL_OPENAI_TEXT_EMBEDDING_3_LARGE': EmbeddingModel is the model of the embedding provider.
        - `failure_class` 'AI_FAILURE_CLASS_UNSPECIFIED' | 'AI_FAILURE_CLASS_CUSTOMER_QUOTA_EXHAUSTED' | 'AI_FAILURE_CLASS_CUSTOMER_CREDENTIAL_REJECTED' | 'AI_FAILURE_CLASS_CUSTOMER_ENDPOINT_UNREACHABLE' | 'AI_FAILURE_CLASS_CUSTOMER_MODEL_UNAVAILABLE' | 'AI_FAILURE_CLASS_CUSTOMER_CONFIG_INVALID' | 'AI_FAILURE_CLASS_LICENSE_NOT_ENTITLED' | 'AI_FAILURE_CLASS_PLATFORM_QUOTA_EXHAUSTED' | 'AI_FAILURE_CLASS_PLATFORM_PROVIDER_ERROR' | 'AI_FAILURE_CLASS_PLATFORM_INTERNAL' | 'AI_FAILURE_CLASS_PLATFORM_INPUT_TOO_LARGE' | 'AI_FAILURE_CLASS_LICENSE_CREDIT_EXHAUSTED' | 'AI_FAILURE_CLASS_PLATFORM_CONTENT_REFUSED': AIFailureClass assigns an LLM request failure to the side of the responsibility boundary that owns the fix. It is selected from the credential the request ran on first, and the provider response second, so the same upstream response can land on either side. - AI_FAILURE_CLASS_UNSPECIFIED: No class was assigned, either because the failure predates classification or because it did not originate at the provider boundary. - AI_FAILURE_CLASS_CUSTOMER_QUOTA_EXHAUSTED: The customer's own provider account is over its rate or spend limit. - AI_FAILURE_CLASS_CUSTOMER_CREDENTIAL_REJECTED: The customer's provider refused the supplied key, so the key is invalid, revoked, or lacks permission for the model. - AI_FAILURE_CLASS_CUSTOMER_ENDPOINT_UNREACHABLE: The customer's provider endpoint could not be reached: DNS, TLS, a connect timeout, or a server error from their own gateway. - AI_FAILURE_CLASS_CUSTOMER_MODEL_UNAVAILABLE: The customer's provider account does not serve the requested model, for example a missing Azure OpenAI deployment name. - AI_FAILURE_CLASS_CUSTOMER_CONFIG_INVALID: The customer's key configuration cannot satisfy the request, for example no enabled key serves the requested model. - AI_FAILURE_CLASS_LICENSE_NOT_ENTITLED: The tenant has provider keys configured but no license entitlement to use them, so the request is refused before any provider call. - AI_FAILURE_CLASS_PLATFORM_QUOTA_EXHAUSTED: Endor's own provider account is over its rate or spend limit. - AI_FAILURE_CLASS_PLATFORM_PROVIDER_ERROR: The provider failed a request made on Endor's own credential. - AI_FAILURE_CLASS_PLATFORM_INTERNAL: Endor's own code failed: the model registry, response validation, or a bug. - AI_FAILURE_CLASS_PLATFORM_INPUT_TOO_LARGE: The prompt exceeded the context window of the model. Endor builds the prompt, so this stays on Endor's side whichever credential ran the request. It is held apart from PLATFORM_INTERNAL because a later attempt on the same code can still succeed once the prompt shortens, which makes it a retry-worthy condition rather than a permanent one. - AI_FAILURE_CLASS_LICENSE_CREDIT_EXHAUSTED: The tenant used all of the AI credit that its license grants for the current period, so a request on Endor's own credentials is refused before any provider call. Like LICENSE_NOT_ENTITLED it is contractual: the tenant clears it through their account team, not through a code fix on either side. - AI_FAILURE_CLASS_PLATFORM_CONTENT_REFUSED: The model or the provider's content filter declined the prompt because of the content it carried. Endor builds the prompt from the code being scanned, so this stays on Endor's side whichever credential ran the request. It is held apart from PLATFORM_INTERNAL because a retry on the same content gets the same answer, and it says nothing about provider or platform health.
        - `model` string: The model of the failed request. Empty, or a model name the model registry knows. The writer drops any other value. Unset on an embedding record, which names its model in embedding_model.
        - `provider_status_code` integer: HTTP status the provider returned. Unset when no response arrived, which a consumer must not read as success.
        - `suppressed_count` number, double: Failures of the bucket that came after its record cap and wrote no record of their own.
      - `tenant_meta` V1TenantMeta, required: Tenant related data for the tenant containing the resource.
        - `namespace` string, required: Namespaces are a way to organize organizational units into virtual groupings of resources. Namespaces must be a fully qualified name, for example, the child namespace of namespace "endor.prod" called "app" is called "endor.prod.app".
      - `uuid` string: The uuid of the resource.
    - `response` V1ListResponse: Response to a list request.
      - `next_page_id` string: The UUID of last message retrieved.
      - `next_page_token` integer: Pagination token that can be used to retrieve the next page of results.

## Other responses

- `default`: An unexpected error response.

## Changes

- **2026-11-03** `4acd9fe15140`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/endorlabs/apis/endor-labs-rest-api-reference/changes/v1/namespaces/:tenant_meta.namespace/ai-request-failures/get.md)

---

[API](https://skmtc.dev/endorlabs/apis/endor-labs-rest-api-reference.md) - [All operations](https://skmtc.dev/endorlabs/apis/endor-labs-rest-api-reference/llms.txt) - [OpenAPI document](https://skmtc.dev/endorlabs/apis/endor-labs-rest-api-reference/revisions/4acd9fe15140?raw)
