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

# Manual Credit Top-up

> Manually add credits to your account balance

Manually purchase and add credits to your account balance using your preferred payment method.

<CodeGroup>
  ```python Python theme={null}
  import requests

  payload = {
      "amount": 100,
      "redirect_url": "https://yourapp.com/dashboard"
  }

  response = requests.post(
      "https://api.videodb.io/billing/topup",
      json=payload,
      headers={"x-access-token": "your_api_key"}
  )

  result = response.json()
  print(f"Payment URL: {result.get('payment_url')}")
  print(f"Session ID: {result.get('session_id')}")
  ```

  ```javascript Node.js theme={null}
  const payload = {
      amount: 100,
      redirectUrl: "https://yourapp.com/dashboard"
  };

  const response = await fetch("https://api.videodb.io/billing/topup", {
      method: "POST",
      headers: {
          "x-access-token": "your_api_key",
          "Content-Type": "application/json"
      },
      body: JSON.stringify(payload)
  });

  const result = await response.json();
  console.log(`Payment URL: ${result.paymentUrl}`);
  console.log(`Session ID: ${result.sessionId}`);
  ```
</CodeGroup>

<Note>
  * Amount is specified in USD (whole dollars)
  * Redirect URL is optional and directs users after payment completes
  * Topup credits are added immediately upon successful payment
  * Your payment method must be configured in your account settings
  * Topup is independent of auto-recharge and can be used alongside it
</Note>

<CardGroup cols={2}>
  <Card title="List Checkouts" icon="list" href="/api-reference/billing/list_checkouts">
    View all payment checkout sessions
  </Card>

  <Card title="Get Usage Statistics" icon="chart-line" href="/api-reference/billing/get_usage">
    Monitor current credit balance and consumption
  </Card>
</CardGroup>


## OpenAPI

````yaml POST /billing/topup
openapi: 3.0.3
info:
  title: VideoDB Server API
  description: >
    VideoDB Server API for video, audio, and image processing with AI
    capabilities.

    This API provides comprehensive video management, search, indexing, and
    AI-powered features.
  version: 1.0.0
  contact:
    name: VideoDB Support
    url: https://videodb.io
  license:
    name: MIT
    url: https://opensource.org/licenses/MIT
servers:
  - url: https://api.videodb.io
    description: Production server
  - url: https://staging-api.videodb.io
    description: Staging server
security:
  - ApiKeyAuth: []
tags:
  - name: Authentication
    description: User authentication and API key management
  - name: Collections
    description: Collection management operations
  - name: Videos
    description: Video upload, processing, and management
  - name: Audio
    description: Audio management operations
  - name: Images
    description: Image management operations
  - name: Search
    description: Content search and indexing
  - name: AI Generation
    description: AI-powered content generation
  - name: Billing
    description: Billing and usage management
  - name: RTStream
    description: Real-time streaming operations
  - name: Utilities
    description: Utility endpoints
  - name: Meeting
    description: Meeting recording and management
  - name: Capture
    description: Capture session management for recording streams
  - name: Editor
    description: Timeline editor operations
  - name: Transcode
    description: Media transcoding operations
  - name: Assets
    description: Cross-collection asset listing
paths:
  /billing/topup:
    post:
      summary: Create topup payment
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - amount
              properties:
                amount:
                  type: number
                  example: 50
                currency:
                  type: string
                  example: usd
      responses:
        '200':
          description: Topup checkout URL
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  data:
                    type: object
                    properties:
                      url:
                        type: string
                        example: https://checkout.stripe.com/pay/xxx
      security:
        - ApiKeyAuth: []
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-access-token
      description: API key for authentication (sk-xxx format)

````