packages/cloud-frontend/content/api/apps.mdx
import { Callout } from "@/docs/components";
Apps are Cloud records used for app identity, hosting metadata, marketplace/domain settings, chat routing, analytics, and monetization.
Get all apps for your organization.
{
"success": true,
"apps": [
{
"id": "uuid-abc123",
"name": "Customer Portal",
"app_url": "https://customer.example.com",
"allowed_origins": ["https://customer.example.com"],
"monetization_enabled": true,
"inference_markup_percentage": "100.0000",
"purchase_share_percentage": "10.0000",
"created_at": "2026-05-05T10:30:00Z"
}
]
}
Create a new Cloud app. The response includes a one-time app API key for server-side app administration.
{
"name": "My App",
"app_url": "https://placeholder.invalid",
"description": "Customer support chatbot",
"website_url": "https://example.com",
"contact_email": "[email protected]",
"allowed_origins": ["https://placeholder.invalid"],
"logo_url": "https://example.com/logo.png",
"skipGitHubRepo": true
}
{
"success": true,
"app": {
"id": "uuid-abc123",
"name": "My App",
"app_url": "https://placeholder.invalid",
"allowed_origins": ["https://placeholder.invalid"],
"created_at": "2026-05-05T10:30:00Z"
},
"apiKey": {
"id": "key_abc123"
}
}
Get app details.
Update all or part of an app record.
{
"app_url": "https://my-app.example.com",
"allowed_origins": ["https://my-app.example.com"],
"website_url": "https://example.com",
"contact_email": "[email protected]",
"is_active": true
}
Delete an app and run cleanup. Pass ?deleteGitHubRepo=false to keep the associated repository when one exists.
OpenAI-style chat completions scoped to a Cloud app. Monetized apps are public to authenticated users with credits; non-monetized apps are limited to the owning organization.
| Header | Description |
|---|---|
Authorization: Bearer <user-token> | Required for user-facing chat. Charges the user's organization credit balance. |
Content-Type: application/json | Required. |
{
"model": "provider/model-id",
"messages": [{ "role": "user", "content": "Hello" }],
"stream": false
}
If monetization is enabled, the app creator earns inferenceMarkupPercentage on the base inference cost.
Get monetization settings.
{
"success": true,
"monetization": {
"monetizationEnabled": true,
"inferenceMarkupPercentage": 100,
"purchaseSharePercentage": 10,
"platformOffsetAmount": 0,
"totalCreatorEarnings": 42.5
}
}
Update monetization settings. All fields are optional.
{
"monetizationEnabled": true,
"inferenceMarkupPercentage": 100,
"purchaseSharePercentage": 10
}
| Field | Range | Description |
|---|---|---|
monetizationEnabled | boolean | Enables creator earnings. |
inferenceMarkupPercentage | 0-1000 | Creator markup on inference calls. |
purchaseSharePercentage | 0-100 | Purchase share percentage. |
Older enabled plus nested pricing request bodies are stale and should not be used.
Get app earnings summary, breakdown, chart data, recent transactions, and monetization settings.
| Parameter | Description |
|---|---|
days | Chart range, 1-90 days. Default: 30. |
Manage custom domains for your multi-tenant applications. See the App Domains guide for detailed configuration instructions.
Get all domains for an app including subdomain and custom domain status.
{
"domain": "myapp.example.com"
}