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
- Go to Settings > Platform Keys in the Dashboard
- Under Gateway Domain, enter your domain (e.g.,
ai.yourapp.com) - Click Add Domain
- Add a CNAME record in your DNS provider:
ai.yourapp.com CNAME assistant-billing.dev
- 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
- Go to Settings > Platform Keys in the Dashboard
- Under API Domain, enter your domain (e.g.,
billing-api.yourapp.com) - Click Add Domain
- 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 Type | Record | Name | Value |
|---|---|---|---|
| Gateway | CNAME | ai.yourapp.com | assistant-billing.dev |
| API | CNAME | billing-api.yourapp.com | assistant-billing.dev |
| Verification (if shown) | TXT | _cf-custom-hostname.ai.yourapp.com | Shown in Dashboard |
Verification
After adding DNS records, the Dashboard shows the domain status:
| Status | Meaning |
|---|---|
| Pending | DNS not yet propagated |
| Active | Domain 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
- Go to Settings > Platform Keys
- Click the trash icon next to the domain
- Confirm removal
The domain stops routing immediately. Remove the DNS records afterward.
Troubleshooting
| Issue | Fix |
|---|---|
| Domain stuck on "Pending" | Verify CNAME points to assistant-billing.dev |
| SSL certificate not issued | Complete any validation records shown in Dashboard; check for conflicting CAA records |
| Requests returning errors | Ensure CNAME target is assistant-billing.dev (not a subdomain); verify API keys are valid |