Treza Account API

The Account API from Treza — 1 operation(s) for account.

GitHub OpenAPI

Operations 1

GET /api/account/balance Get credit balance and plan usage #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/trezalabs-com:trezalabs-com-account-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

trezalabs-com-account-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Treza Pipelines Account API
  description: 'Treza builds video pipelines from a description. Build pipelines that chain the best AI models (Veo 3.1, Seedance 2.5, Gemini Image, Llama, and any open model) with voiceover, captions, sequencing, and publishing, then call any published pipeline as an API.


    Two ways to call a published pipeline:

    - Typed invoke: POST /api/pipelines/{id}/invoke with JSON inputs matching the pipeline''s input contract. Returns a runId (HTTP 202); poll GET /api/pipelines/{id}/invoke?runId=... for status and outputs.

    - OpenAI-compatible: POST /api/pipelines/{id}/chat/completions works as a drop-in for any OpenAI SDK, streaming included. The latest user message feeds the pipeline and the output returns as the assistant message.


    Authentication uses scoped API keys (Bearer treza_live_...) created in the Treza platform or minted over MCP (create_api_key). The key must own the pipeline and the pipeline must be published. Starting a run needs the pipelines:run permission; polling one takes pipelines:read or pipelines:run. Billing is prepaid credits that work across every model; check the balance at GET /api/account/balance, and top up either via a human at the dashboard or, on deployments with x402 enabled, agent-natively at POST /api/billing/credits/x402.


    An MCP server is also available at https://www.trezalabs.com/api/mcp (streamable HTTP, OAuth 2.1) exposing tools to list, author, and publish pipelines, inspect runs, trigger new runs, check the credit balance, estimate run cost, and mint scoped API keys (create_api_key, for OAuth connections). Every one of those tools is also plain HTTP with an API key, listed below under /api/v1/tools/{name}: POST the tool''s arguments as the JSON body, with the same key. They list your pipelines, runs and media library, author and publish pipelines, run them, and assemble or edit media.'
  version: 3.0.0
  contact:
    name: Treza Support
    url: https://www.trezalabs.com/support
    email: hello@trezalabs.com
servers:
- url: https://www.trezalabs.com
  description: Production
security:
- bearerAuth: []
tags:
- name: Account
paths:
  /api/account/balance:
    get:
      operationId: getAccountBalance
      summary: Get credit balance and plan usage
      description: Current prepaid credit balance, plan usage, and purchasable credit packs. Accepts a scoped API key (any pipelines scope), an MCP OAuth access token, or a session bearer. Use it to budget runs before starting them; when the balance is low, hand topUpUrl to a human, or top up from a wallet at x402.url. 60 requests a minute per account.
      responses:
        '200':
          description: Balance summary
          content:
            application/json:
              schema:
                type: object
                properties:
                  balanceUsd:
                    type: number
                  enforced:
                    type: boolean
                    description: False when this account runs free (credits not enforced).
                  markup:
                    type: number
                    description: Multiplier applied to estimated provider cost when charging the balance.
                  typicalVideoChargeUsd:
                    type: number
                  approxVideosRemaining:
                    type: integer
                  shortClip:
                    type: object
                    description: The cheapest clip to budget against, priced as the pre-run check prices it.
                    properties:
                      model:
                        type: string
                      name:
                        type: string
                      seconds:
                        type: number
                      resolution:
                        type: string
                      chargeUsd:
                        type: number
                  shortClipsRemaining:
                    type: integer
                  plan:
                    type:
                    - object
                    - 'null'
                    properties:
                      name:
                        type: string
                      status:
                        type: string
                      requestsThisPeriod:
                        type: integer
                      includedRequests:
                        type: integer
                      overLimit:
                        type: boolean
                  packs:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                        priceUsd:
                          type: number
                        creditsUsd:
                          type: number
                        label:
                          type: string
                  topUpUrl:
                    type: string
                    format: uri
                    description: Where a person buys credits (Settings, opened on the credit packs).
                    example: https://www.trezalabs.com/platform/settings#billing
                  x402:
                    type: object
                    description: Present when the deployment supports agent-native x402 top-ups.
                    properties:
                      url:
                        type: string
                        format: uri
                      topUpPerCallUsd:
                        type: number
                      network:
                        type: string
                        description: 'The first network the x402 endpoints accept: eip155:8453 (Base).'
                      networks:
                        type: array
                        items:
                          type: string
                        description: 'Every network a payment may arrive on, Base first: eip155:8453 and solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp. A Base wallet and a Solana wallet are separate accounts.'
                      video:
                        type: object
                        description: 'Present when pay-per-video is on: POST /api/x402/video buys one clip for one payment, with no account. sizes lists the default model''s clip lengths; GET that URL for every model and price.'
                        properties:
                          url:
                            type: string
                            format: uri
                          fromUsd:
                            type: number
                          sizes:
                            type: array
                            items:
                              type: object
                              properties:
                                seconds:
                                  type: number
                                priceUsd:
                                  type: number
        '401':
          description: Missing or invalid bearer token, or an API key with no pipelines permission
        '429':
          description: Rate limit (code RATE_LIMITED, with retryAfter in seconds and Retry-After and X-RateLimit-* headers)
        '500':
          description: Internal server error
      tags:
      - Account
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Scoped API key created in the Treza platform (treza_live_...)
    WalletAuth:
      type: apiKey
      in: header
      name: SIGN-IN-WITH-X
      x-agentcash-auth-kind: siwx
      description: 'Sign-In-With-X (the x402 sign-in-with-x extension, CAIP-122): a wallet''s signed proof of itself, for the free purchases list. Answer the 402 challenge; no payment.'