---
title: "List AI Request Logs"
method: GET
path: "/ai/request-logs"
tags: ["AI"]
---

# List AI Request Logs

`GET /ai/request-logs`

## Request

- Base URL: `https://api.crowdin.com/api/v2`
- URL: `https://api.crowdin.com/api/v2/ai/request-logs`
- Auth: none declared
- TypeScript: <https://skmtc.dev/crowdin/apis/crowdin-enterprise-api-v2/docs/ai/request-logs/get.ts> (a function with typed inputs; its response is checked against the schema)

**Required scopes:** `ai.request-log` (Read only).

## Query parameters

- `limit` integer
- `offset` integer
- `requestId` string
- `projectId` integer
- `userId` integer
- `aiProviderId` integer
- `model` string
- `sourceAction` 'ai_proxy' | 'ai_gateway' | 'ai_translate_strings' | 'ai_file_translate' | 'ai_prompt_completion' | 'pre_translate:manual' | 'pre_translate:workflow' | 'ai_alignment' | 'qa_check' | 'ai_suggestion' | 'advisor'
- `promptAction` string
- `statuses` string[]
- `systemCredentials` boolean
- `isAutoTriggered` boolean
- `tokenName` string
- `oauthClientId` string
- `createdAfter` string, date-time
- `createdBefore` string, date-time

## Response `200`

AI request logs list

- AiRequestLogCollectionResource: Base schema of resource container. Container is a wrapper object that contains payload in required `data` property and provides space for adding any other metadata.
  - `data` AiRequestLogResource[], required
    - `data` AiRequestLog, required
      - `id` integer: ID of the log entry
      - `requestId` string: Unique identifier of the request
      - `createdAt` string, date-time: Date the request was logged, in ISO 8601 format
      - `status` 'pending' | 'success' | 'error' | 'timeout': Request status. One of: `pending`, `success`, `error`, `timeout`
      - `httpStatus` integer, nullable: HTTP status code returned by the AI provider. `null` when no HTTP response was recorded
      - `model` string: Name of the AI model used for the request
      - `sourceAction` 'ai_proxy' | 'ai_gateway' | 'ai_translate_strings' | 'ai_file_translate' | 'ai_prompt_completion' | 'pre_translate:manual' | 'pre_translate:workflow' | 'ai_alignment' | 'qa_check' | 'ai_suggestion' | 'advisor': Feature or channel that produced the request
      - `promptAction` string, nullable: Prompt action associated with the request. `null` when the request has no associated action
      - `systemCredentials` boolean: Whether the request used system-provided credentials rather than the organization's own
      - `isAutoTriggered` boolean: Whether the request was triggered automatically (e.g. by a workflow) rather than by an interactive user action
      - `durationMs` integer, nullable: Request duration in milliseconds. `null` while the request is still `pending`
      - `inputTokens` integer, nullable: Number of input tokens consumed. `null` until usage is recorded for the request
      - `outputTokens` integer, nullable: Number of output tokens generated. `null` until usage is recorded for the request
      - `totalCost` number, float, nullable: Cost of the request in USD as recorded at billing time; null when no price is known for the model
      - `userId` integer, nullable: The user attributed to the request; null for system/automated requests
      - `projectId` integer, nullable: ID of the project the request was made in. `null` for requests not tied to a specific project
      - `promptId` integer, nullable: ID of the AI prompt used for the request. `null` when the request didn't use a saved prompt
      - `aiProviderId` integer: ID of the AI provider used for the request
      - `tokenName` string, nullable: Name of the personal access token used for authentication, if the request was token-authenticated
      - `oauthClientId` string, nullable: OAuth `client_id` of the application that authenticated the request. `null` when the request was not authenticated via an OAuth application.
      - `oauthClientName` string, nullable: Display name of the OAuth application, resolved from `oauthClientId`. `null` when not app-authenticated or the application no longer exists.
      - `ip` string, nullable: IP address the request originated from. `null` for automated requests with no HTTP origin
      - `userAgent` string, nullable: User agent of the client that made the request. `null` when not recorded
      - `error` string, nullable: Error message, present only for failed requests
  - `pagination` Pagination: Pagination Response Model
    - `offset` integer
    - `limit` integer

## Other responses

- `400`: Invalid Request Parameters
- `401`: Unauthorized
- `403`: Forbidden
- `405`: Method Not Allowed

---

[API](https://skmtc.dev/crowdin/apis/crowdin-enterprise-api-v2.md) - [All operations](https://skmtc.dev/crowdin/apis/crowdin-enterprise-api-v2/llms.txt) - [OpenAPI document](https://skmtc.dev/crowdin/apis/crowdin-enterprise-api-v2/revisions/dc68744c5384?raw)
