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

# Buy net credits with a hosted Stripe Invoice

> A fixed 5% platform fee is added to the net credit amount before applicable tax. Provider usage remains billed at provider list prices with no usage markup.



## OpenAPI

````yaml /openapi.yaml post /v1/billing/invoice
openapi: 3.1.0
info:
  title: Impossibl AI API
  version: 0.0.1
  description: >
    The Impossibl AI API is one API for all AI providers, OpenAI-compatible
    across OpenAI,

    Anthropic, Google, xAI, and more (`GET /v1/models` lists the full catalog),

    billed from a prepaid credit balance.


    Provider usage is billed at provider list prices with no usage markup.

    Prepaid credit purchases charge a separate fixed 5% platform fee before tax.


    **Agent quickstart**

    1. `POST /v1/accounts` — create a funded account; you get an API key and a
       signup-bonus balance in one call (no human step required).
    2. Call `POST /v1/chat/completions`, `POST /v1/responses`, or
       `POST /v1/audio/transcriptions` with
       `Authorization: Bearer <key>` and a `provider/model` id from `GET /v1/models`.
    3. Credits are deducted per request by token or audio-duration usage; check
    `GET /v1/account`.
servers:
  - url: https://api.impossibl.com
    description: Production
  - url: http://localhost:8787
    description: Local dev
security:
  - BearerKey: []
paths:
  /v1/billing/invoice:
    post:
      summary: Buy net credits with a hosted Stripe Invoice
      description: >-
        A fixed 5% platform fee is added to the net credit amount before
        applicable tax. Provider usage remains billed at provider list prices
        with no usage markup.
      operationId: createBillingInvoice
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                amount_usd:
                  type: number
                  minimum: 5
                  description: >-
                    Desired net credit amount in USD; fractional dollars are
                    rounded down
      responses:
        '200':
          description: Hosted invoice URL and pre-tax billing breakdown
          content:
            application/json:
              schema:
                type: object
                properties:
                  invoice_url:
                    type: string
                  invoice_id:
                    type: string
                  credit_amount_cents:
                    type: integer
                    description: Net prepaid credits purchased
                    in cents: null
                    example: 1000
                  platform_fee_cents:
                    type: integer
                    description: Fixed 5% platform fee
                    in cents: null
                    example: 50
                  invoice_amount_cents:
                    type: integer
                    description: Credits plus platform fee before tax
                    in cents: null
                    example: 1050
        '503':
          description: Billing not configured
components:
  securitySchemes:
    BearerKey:
      type: http
      scheme: bearer
      description: Gateway API key (`imp-rt-...`) from POST /v1/accounts or /v1/keys.

````