Skip to content
Last updated

The Invoice API provides endpoints for generating, retrieving, and managing invoices for organization usage on the Freddy AI platform. All endpoints require authentication, and most operations are restricted to staff users only.

Overview

Invoices are automatically generated based on organization usage of AI models and services. Each invoice includes:

  • Detailed line items for each model used
  • Token usage breakdown (input/output)
  • Pricing per model and provider
  • Tax calculations (Swiss VAT)
  • Payment tracking

Invoice Lifecycle

Invoices follow a defined status workflow:

  1. draft - Invoice created but not finalized
  2. issued - Invoice finalized and sent to organization
  3. paid - Payment received and recorded
  4. overdue - Payment past due date
  5. cancelled - Invoice cancelled

Invoice Numbering

Invoice numbers follow the format: INV-{YYYY}-{MM}-{ORG_PREFIX}-{SEQUENCE}

Example: INV-2024-12-AIT-001

Access Control

  • Staff Users: Can create, view, and manage all invoices
  • Organization Users: Can only view invoices for their own organization

Base URL

https://api.aitronos.com/v1/invoices