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

# Get credit balance

> Returns the current credit balance for the organization tied to this API key.




## OpenAPI

````yaml /openapi-v1.yaml get /credits
openapi: 3.1.0
info:
  title: Origami API
  version: '1.0'
  description: >
    > **Deprecated.** v1 is superseded by the canonical

    > [v2 API](./openapi-v2) (four segments: Agents, Workspace, Sequences,

    > Account). v1 remains fully functional with **no removal date in this

    > release** — but new integrations should target v2. See the

    > [v1 → v2 migration guide](./api-v1-to-v2-migration): `GET /tables` →

    > `GET /api/v2/tables`, `GET /tables/:id/rows` →

    > `GET /api/v2/tables/:tableId/rows`, `POST /tables/:id/rows` →

    > `POST /api/v2/tables/:tableId/rows/upsert` (upsert; no bare insert),

    > `GET /batches/:id` → `GET /api/v2/batches/:batchId`, `GET /credits` →

    > `GET /api/v2/account/credits`.


    The Origami API lets you enrich company and people data programmatically.

    See the [Quickstart](/quickstart) for a walkthrough with curl examples.


    All write endpoints are **asynchronous** — a `POST` returns a `batchId`
    immediately.

    Poll `GET /batches/{batchId}` for progress and enriched results.


    ## Rate limits


    Limits apply in layers: **per IP** (all requests), **per organization**
    (after a valid API key), and an extra **insert** cap on row writes.


    | Scope | Limit |

    |-------|-------|

    | Per client IP | **300 requests / minute** |

    | Per organization (all endpoints) | **100 requests / minute** |

    | `POST /tables/{tableId}/rows` (per organization) | **10 requests /
    minute** |


    Each layer exposes its own response headers:
    `X-RateLimit-Limit-{IP|Global|Insert}`,

    `X-RateLimit-Remaining-{IP|Global|Insert}`, and
    `X-RateLimit-Reset-{IP|Global|Insert}` (Unix seconds).

    A request may include several of these when multiple layers apply.


    ## Request IDs


    Every response includes an `X-Request-Id` header. You can pass your own ID

    via the `X-Request-Id` request header (1–64 alphanumeric / dash / underscore

    characters); otherwise the server generates a UUID. Include this ID in
    support

    requests to help us trace issues.


    ## Errors


    All errors follow a consistent format:


    ```json

    {
      "error": "Human-readable error message",
      "code": "MACHINE_READABLE_CODE"
    }

    ```


    Some errors include additional context fields like `path`, `fields`, `hint`,
    `current`, `limit`, or `requested`.


    | Code | Status | Meaning |

    |------|--------|---------|

    | `UNAUTHORIZED` | 401 | Missing, invalid, revoked, or expired API key. |

    | `VALIDATION_ERROR` | 400 | Invalid request parameter or body. |

    | `NOT_FOUND` | 404 | Table or batch not found. |

    | `RATE_LIMITED` | 429 | Too many requests — see rate-limit headers. |

    | `INSUFFICIENT_CREDITS` | 402 | Not enough credits to complete the
    operation. |

    | `SUBSCRIPTION_REQUIRED` | 402 | Feature requires a plan upgrade. |

    | `INTERNAL_ERROR` | 500 | Unexpected server error. |


    ## Webhooks


    Receive sequencer events (sends, replies, connection acceptances) via

    HTTPS POST. Configure endpoints in **Settings → Developers → Webhooks**

    or read the [webhooks reference](/webhooks/overview). The full event

    catalog ships as [openapi-webhooks.yaml](/openapi-webhooks.yaml) so

    coding agents can author working receivers from the spec.
  contact:
    name: Origami Support
    url: https://origami.chat
  license:
    name: Proprietary
servers:
  - url: https://origami.chat/api/v1
    description: Production
security:
  - apiKey: []
tags:
  - name: Tables
    description: List tables and read row data.
  - name: Rows
    description: Insert rows and trigger enrichment.
  - name: Batches
    description: Poll async batch progress and retrieve results.
  - name: Credits
    description: Check your organization's credit balance.
paths:
  /credits:
    get:
      tags:
        - Credits
      summary: Get credit balance
      description: >
        Returns the current credit balance for the organization tied to this API
        key.
      operationId: getCredits
      responses:
        '200':
          description: Credit balance retrieved.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Credits'
              example:
                balance: 1250
                currency: credits
        '401':
          $ref: '#/components/responses/Unauthorized'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
components:
  schemas:
    Credits:
      type: object
      required:
        - balance
        - currency
      properties:
        balance:
          type: integer
          description: >-
            Current credit balance for the organization (rounded to nearest
            whole credit).
        currency:
          type: string
          enum:
            - credits
    Error:
      type: object
      required:
        - error
        - code
      properties:
        error:
          type: string
          description: Human-readable error message.
        code:
          type: string
          description: Machine-readable error code.
      additionalProperties: true
  responses:
    Unauthorized:
      description: Missing, invalid, revoked, or expired API key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: Invalid API key
            code: UNAUTHORIZED
    RateLimited:
      description: Rate limit exceeded.
      headers:
        X-RateLimit-Limit-IP:
          schema:
            type: integer
          description: IP bucket — maximum requests allowed in the window.
        X-RateLimit-Remaining-IP:
          schema:
            type: integer
          description: IP bucket — requests remaining in the current window.
        X-RateLimit-Reset-IP:
          schema:
            type: integer
          description: IP bucket — Unix timestamp when the window resets.
        X-RateLimit-Limit-Global:
          schema:
            type: integer
          description: Organization bucket — maximum requests allowed in the window.
        X-RateLimit-Remaining-Global:
          schema:
            type: integer
          description: Organization bucket — requests remaining in the current window.
        X-RateLimit-Reset-Global:
          schema:
            type: integer
          description: Organization bucket — Unix timestamp when the window resets.
        X-RateLimit-Limit-Insert:
          schema:
            type: integer
          description: >-
            Insert bucket — maximum requests allowed in the window (write routes
            only).
        X-RateLimit-Remaining-Insert:
          schema:
            type: integer
          description: Insert bucket — requests remaining in the current window.
        X-RateLimit-Reset-Insert:
          schema:
            type: integer
          description: Insert bucket — Unix timestamp when the window resets.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: Rate limit exceeded
            code: RATE_LIMITED
    InternalError:
      description: Unexpected server error.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: Internal server error
            code: INTERNAL_ERROR
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer
      bearerFormat: og_live_*
      description: |
        API key with `og_live_` prefix. Create keys in **Settings → API Keys**.

        Pass in the `Authorization` header:
        ```
        Authorization: Bearer og_live_abc123...
        ```

````