Skip to content

Latest commit

 

History

History
296 lines (229 loc) · 6.41 KB

File metadata and controls

296 lines (229 loc) · 6.41 KB
title Apps
description Create and manage applications on elizaOS Cloud. Build integrations with your agents and APIs.

import { Callout, Steps, Tabs, Cards } from "nextra/components";

Apps

Apps let you build integrations and manage access to your elizaOS Cloud resources.

Stable

Overview

An App in elizaOS Cloud provides:

  • API Keys: Unique keys for programmatic access
  • Usage Tracking: Monitor API calls and costs
  • User Management: Track app users
  • Analytics: Insights into app performance
  • Monetization: Earn from app usage

Quick Start

Dashboard

Navigate to Dashboard → Apps to create and manage apps.

API

# Create a new app
curl -X POST "https://cloud.milady.ai/api/v1/apps" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "My Integration",
    "app_url": "https://myapp.example.com",
    "description": "Custom integration for my product",
    "website_url": "https://example.com"
  }'

Creating an App

### Navigate to Apps Go to [Dashboard → Apps](/dashboard/apps) and click "Create App".

Configure App

  • Name: Display name for your app (required)
  • App URL: Your app's callback/webhook URL (required)
  • Description: What your app does
  • Website URL: (Optional) Your public website

Get API Key

Your app receives a unique API key for authentication.

Integrate

Use the API key to make requests on behalf of your app.

Response

{
  "success": true,
  "app": {
    "id": "uuid-abc123",
    "name": "My Integration",
    "app_url": "https://myapp.example.com",
    "api_key": "ek_xxx...",
    "created_at": "2024-01-15T10:30:00Z"
  }
}
Save your API key securely. It will only be shown once.

App Configuration

Basic Settings

Field Description
name Display name for your app
description Brief description of functionality
website Public website URL
logo App icon/logo image

API Settings

Field Description
rateLimit Requests per minute
allowedEndpoints Which APIs the app can access
webhookUrl URL for event notifications

Usage Tracking

Monitor your app's API usage:

curl -X GET "https://cloud.milady.ai/api/v1/apps/{appId}/analytics" \
  -H "Authorization: Bearer YOUR_API_KEY"

Response

{
  "appId": "app_abc123",
  "period": "2024-01",
  "usage": {
    "totalRequests": 15000,
    "chatCompletions": 12000,
    "embeddings": 2500,
    "images": 500
  },
  "costs": {
    "total": 125.5,
    "byEndpoint": {
      "chat": 100.0,
      "embeddings": 15.0,
      "images": 10.5
    }
  },
  "uniqueUsers": 234
}

User Management

Track users of your app:

curl -X GET "https://cloud.milady.ai/api/v1/apps/{appId}/users" \
  -H "Authorization: Bearer YOUR_API_KEY"

Response

{
  "users": [
    {
      "id": "user_123",
      "firstSeen": "2024-01-10T08:00:00Z",
      "lastSeen": "2024-01-15T12:30:00Z",
      "requestCount": 150
    }
  ],
  "total": 234,
  "page": 1
}

Monetization

New

Earn from your app's usage:

curl -X POST "https://cloud.milady.ai/api/v1/apps/{appId}/monetization" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "enabled": true,
    "pricing": {
      "perRequest": 0.001,
      "perToken": 0.00001
    }
  }'

Earnings

curl -X GET "https://cloud.milady.ai/api/v1/apps/{appId}/earnings" \
  -H "Authorization: Bearer YOUR_API_KEY"
{
  "total": 1250.0,
  "pending": 150.0,
  "available": 1100.0,
  "history": [
    {
      "date": "2024-01-15",
      "amount": 45.0,
      "requests": 45000
    }
  ]
}

Webhooks

Receive real-time notifications:

{
  "webhookUrl": "https://your-server.com/webhook",
  "events": ["user.created", "usage.threshold", "error.occurred"]
}

Webhook Payload

{
  "event": "usage.threshold",
  "timestamp": "2024-01-15T10:30:00Z",
  "data": {
    "appId": "app_abc123",
    "threshold": "1000",
    "currentUsage": 1050
  }
}

API Key Management

Regenerate Key

curl -X POST "https://cloud.milady.ai/api/v1/apps/{appId}/regenerate-api-key" \
  -H "Authorization: Bearer YOUR_API_KEY"
Regenerating invalidates the old key immediately. Update your integrations promptly.

Key Permissions

Restrict what your app key can access:

{
  "permissions": ["chat:read", "chat:write", "embeddings:read", "agents:read"]
}

Custom Domains

Apps support custom domains for multi-tenant deployments:

  • Wildcard Subdomains: Every app gets {app-slug}.apps.cloud.milady.ai
  • Custom Domains: Bring your own domain with automatic SSL
  • DNS Management: Easy verification and configuration
# Add a custom domain
curl -X POST "https://cloud.milady.ai/api/v1/apps/{appId}/domains" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"domain": "myapp.example.com"}'

See App Domains for complete domain management documentation.

Best Practices

  • Secure Keys — Never expose API keys in client-side code; use server-side proxying
  • Monitor Usage — Set up alerts in Dashboard → Analytics for unusual activity
  • Rate Limiting — Implement client-side rate limiting to avoid 429 errors
  • Error Handling — Handle API errors gracefully with retry logic (see Error Handling)
  • Custom Domains — Use canonical tags when serving from multiple domains to avoid SEO issues

Next Steps

Configure custom domains Deploy custom containers Complete API documentation Set up monetization