---
title: "Get an AI operation"
method: GET
path: "/operations/{id}"
tags: ["Operations"]
---

# Get an AI operation

`GET /operations/{id}`

## Request

- Base URL: `https://api.promptessor.com/v1`
- URL: `https://api.promptessor.com/v1/operations/{id}`
- Auth: one of:
  - HTTP bearer
  - OAuth 2
    - Authorization code: `https://auth.promptessor.com/authorize`
    - Token URL: `https://auth.promptessor.com/token` scopes: `operations:read`

## Response `200`

Success

- object
  - `data` Operation, required
    - `id` string, required
    - `object` 'operation', required
    - `kind` string, required
    - `status` 'pending' | 'running' | 'succeeded' | 'failed' | 'cancelled', required
    - `response` unknown, required
    - `responseStatus` integer, nullable, required
    - `errorCode` string, nullable, required
    - `history` HistoryLink, required
      - `type` string, nullable, required
      - `id` string, required
      - `url` string
    - `usage` UsageCharge, required
      - `creditsCharged` integer, required
      - `source` string, nullable, required
      - `tokens` integer, nullable
    - `createdAt` string, date-time, required
    - `startedAt` string, date-time, nullable, required
    - `completedAt` string, date-time, nullable, required
  - `requestId` string, required

## Other responses

- `400`: Invalid request
- `401`: Authentication failed
- `403`: Insufficient scope or plan entitlement
- `404`: Resource not found
- `429`: Rate, concurrency, usage, or active-resource limit reached
- `500`: Unexpected server failure

---

[API](https://skmtc.dev/promptessor/apis/promptessor-public-api.md) - [All operations](https://skmtc.dev/promptessor/apis/promptessor-public-api/llms.txt) - [OpenAPI document](https://skmtc.dev/promptessor/apis/promptessor-public-api/revisions/b77103396027?raw)
