Assistant Billing

Custom Domains

Use your own domain instead of assistant-billing.dev for a white-label experience.

Gateway Domain

Route AI requests through your domain (e.g., ai.yourapp.com/v1/chat/completions instead of gateway.assistant-billing.dev/v1/chat/completions).

Configure

  1. Go to Settings > Platform Keys in the Dashboard
  2. Under Gateway Domain, enter your domain (e.g., ai.yourapp.com)
  3. Click Add Domain
  4. Add a CNAME record in your DNS provider:
ai.yourapp.com  CNAME  assistant-billing.dev
  1. SSL is provisioned automatically via Cloudflare

Use with the SDK

import { GatewayClient } from "@assistant-billing/sdk"
 
const gateway = new GatewayClient({
  apiKey: "sk_ab_live_xyz789",
  baseURL: "https://ai.yourapp.com",
})

API Domain

Customize the Platform API endpoint (e.g., billing-api.yourapp.com instead of api.assistant-billing.dev).

Configure

  1. Go to Settings > Platform Keys in the Dashboard
  2. Under API Domain, enter your domain (e.g., billing-api.yourapp.com)
  3. Click Add Domain
  4. Add a CNAME record:
billing-api.yourapp.com  CNAME  assistant-billing.dev

Use with the SDK

import { BillingClient } from "@assistant-billing/sdk"
 
const billing = new BillingClient({
  baseURL: "https://billing-api.yourapp.com/v1/platform",
  getToken: () => fetchSessionToken(),
})

DNS Configuration

Domain TypeRecordNameValue
GatewayCNAMEai.yourapp.comassistant-billing.dev
APICNAMEbilling-api.yourapp.comassistant-billing.dev
Verification (if shown)TXT_cf-custom-hostname.ai.yourapp.comShown in Dashboard

Verification

After adding DNS records, the Dashboard shows the domain status:

StatusMeaning
PendingDNS not yet propagated
ActiveDomain is live and serving requests

Propagation usually completes within minutes but can take up to 48 hours. SSL certificates are provisioned automatically once DNS is verified.

Vercel AI SDK

import { createOpenAI } from "@ai-sdk/openai"
 
const provider = createOpenAI({
  baseURL: "https://ai.yourapp.com/v1",
  apiKey: "sk_ab_live_xyz789",
})

Removing a Custom Domain

  1. Go to Settings > Platform Keys
  2. Click the trash icon next to the domain
  3. Confirm removal

The domain stops routing immediately. Remove the DNS records afterward.

Troubleshooting

IssueFix
Domain stuck on "Pending"Verify CNAME points to assistant-billing.dev
SSL certificate not issuedComplete any validation records shown in Dashboard; check for conflicting CAA records
Requests returning errorsEnsure CNAME target is assistant-billing.dev (not a subdomain); verify API keys are valid