Skip to content

Quick Start

Prerequisites

  • Docker + Docker Compose
  • An Anthropic API key (for AI agents — optional)
  • A Resend API key (for email — optional)

1. Clone and configure

Terminal window
git clone <repo-url> ltg-api-portal
cd ltg-api-portal
cp .env.example .env

Edit .env with your secrets:

ANTHROPIC_API_KEY=sk-ant-...
RESEND_API_KEY=re_...
MINIO_ROOT_USER=minioadmin
MINIO_ROOT_PASSWORD=minioadmin

2. Start all services

Terminal window
docker compose up -d

Wait ~30 seconds for Convoy and MinIO to fully initialize, then visit:

3. Upload an OpenAPI spec

Terminal window
curl -X POST http://localhost:3000/api/specs/my-api.json \
-H "Content-Type: application/json" \
-d @path/to/your/openapi.json

Or use the portal → APIs page to upload via the browser.

4. Create a product

Terminal window
curl -X POST http://localhost:3000/api/products \
-H "Content-Type: application/json" \
-d '{
"name": "My API",
"description": "Managed access to My API",
"status": "active",
"specFile": "my-api.json",
"category": "integration",
"tags": ["REST"]
}'

5. Create a subscription

Terminal window
curl -X POST http://localhost:3000/api/subscriptions \
-H "Content-Type: application/json" \
-d '{
"name": "Acme Corp",
"productId": "<product-id-from-step-4>",
"plan": "professional",
"scope": "read"
}'

The response includes your apiKey:

{
"id": "sub_...",
"apiKey": "ltg_live_xxxxxxxxxxxxxxxx",
"plan": "professional",
"scope": "read",
...
}

6. Validate a call through the gateway

Terminal window
curl -X POST http://localhost:3000/api/gateway/validate \
-H "Content-Type: application/json" \
-d '{
"apiKey": "ltg_live_xxxxxxxxxxxxxxxx",
"method": "GET",
"path": "/api/tickets"
}'

Success response:

{
"valid": true,
"subscriptionId": "sub_...",
"plan": "professional",
"scope": "read",
"headers": {
"X-RateLimit-Limit": "100",
"X-RateLimit-Remaining": "99",
"X-RateLimit-Reset": "60",
"X-Quota-Limit": "10000",
"X-Quota-Used": "1",
"X-Quota-Remaining": "9999"
}
}

Next steps