API Reference

StanleyAI exposes a RESTful API for programmatic access. All endpoints return JSON.

Base URL: https://your-instance.example.com — Replace with your deployed instance URL

Authentication

API authentication is coming soon. Currently, endpoints are accessible within your deployment. The upcoming auth system will use API key-based authentication:

curl -H "Authorization: Bearer sk_your_api_key" \
  https://your-instance.example.com/skills

Skills API

GET/skills
List all installed skills with descriptions and categories
GET/skills/search?q=keyword
Search skills by name, description, or trigger phrases
GET/skills/recommend?task=description
Get top 3 skills recommended for a task
GET/skills/categories
List all skill categories with counts
GET/skills/:name
Get full details for a single skill

Agents API

GET/agents
List all configured agents with status
GET/agents/:name
Get details for a single agent
GET/agents/search?q=keyword
Search agents by name or role

Content API

POST/research
Get trending topic ideas for a niche
POST/draft
Generate article draft with headline, sections, and social snippets
POST/generate-image
Generate hero image via AI model
POST/publish
Store and publish content piece
POST/pipeline
Full pipeline: research, draft, image, store
GET/content
List content pieces with filters

Leads API

POST/leads
Submit a new lead
GET/leads
List leads with optional filters
GET/leads/pipeline
Leads grouped by status with values
GET/leads/stats
Conversion metrics and totals

Briefing API

GET/briefing
Full aggregated daily briefing
GET/briefing/trading
Trading section only
GET/briefing/content
Content pipeline section only
GET/briefing/systems
System health section only

Response Format

All endpoints return JSON with consistent structure:

// Success
{"data": [...], "count": 10, "status": "ok"}

// Error
{"error": "Description of what went wrong", "status": 400}