Base URL
All API requests should be made to:https://api.omium.ai/api/v1
Authentication
All API requests require authentication using an API key. Include it in theX-API-Key header or as a Bearer token.
Endpoints
Get Credit Balance
GET /billing/balance
Retrieve the current credit balance and its USD equivalent for the authenticated tenant.
Response:
Initiate Top-Up
POST /billing/topup
Initiate a credit top-up, returning a client secret for Stripe payment.
Request Body:
Get Transaction History
GET /billing/transactions
Retrieve a list of all billing transactions (top-ups, usage, etc.) for the authenticated tenant.
Query Parameters:
page: Page number (default: 1)page_size: Items per page (default: 50)type: Filter by transaction type (topup|usage|subscription)
Create Subscription Checkout
POST /billing/subscriptions/create-checkout
Initiate a Stripe Checkout session for a new subscription.
Request Body:
Get Subscription Status
GET /billing/subscriptions/status
Retrieve the current subscription status for the authenticated tenant.
Response:
Create Customer Portal Session
POST /billing/subscriptions/portal
Create a session for the Stripe Customer Portal, allowing users to manage their subscription.
Request Body:
Cancel Subscription
POST /billing/subscriptions/cancel
Cancel the current subscription. By default, it cancels at the end of the current billing period.
Query Parameters:
immediately: Iftrue, cancels the subscription immediately (default:false).