> ## Documentation Index
> Fetch the complete documentation index at: https://docs.plungeai.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Post-hoc usage and cost of one completion.

> Post-hoc usage and cost of one completion. id = the gen-… completion id (/api/v1) or the x-request-id.


## OpenAPI

```yaml openapi.json get /api/v1/generation
openapi: 3.1.0
info:
  title: Ocean One API
  version: 2.2.0
servers:
  - url: https://api.plungeai.com
paths:
  /api/v1/generation:
    get:
      operationId: get-api-v1-generation
      summary: Post-hoc usage and cost of one completion. id = the gen-… completion id (/api/v1) or the x-request-id.
      security:
        - ozkBearer: []
        - skOcean: []
      parameters:
        - name: id
          in: query
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Generation record
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
        "401":
          description: Missing/invalid key
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "404":
          description: not_found — no such generation for this account
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
components:
  schemas:
    Error:
      type: object
      description: Standard error envelope. Every error response also carries an `X-Error-Code` response header equal to error.code, so a client branches on the header regardless of the negotiated body format (json | yaml | markdown | text). When the request created an execution, the `X-Execution-Id` response header is also set. Errors follow the negotiated format like success bodies.
      properties:
        error:
          type: object
          properties:
            code:
              type: string
            message:
              type: string
          required:
            - code
            - message
          additionalProperties: true
      required:
        - error
  securitySchemes:
    ozkBearer:
      type: http
      scheme: bearer
      description: "ozk_ platform API key (Authorization: Bearer ozk_…)"
    skOcean:
      type: http
      scheme: bearer
      description: "Legacy sk-ocean- inference key: still accepted on the money plane until the sk-ocean- sunset; new integrations use the ozk_ key"
```
