Skip to main content

Agent Platform — API Reference

All endpoints require:
Base URL: https://www.citedy.com Credit value: 1 credit = $0.01 USD

MCP v1 Exposure Policy (Public)

This file documents the full Agent API. Public MCP v1 intentionally exposes a smaller, outcome-first subset:
  • GET /api/agent/health
  • GET /api/agent/status
  • GET /api/agent/settings
  • GET /api/agent/schedule/gaps
  • GET /api/agent/webhooks/deliveries
  • POST /api/agent/products
  • GET /api/agent/products
  • DELETE /api/agent/products/[id]
  • POST /api/agent/products/search
  • POST /api/agent/shorts
  • GET /api/agent/shorts/[id]
  • POST /api/agent/shorts/script
  • POST /api/agent/shorts/avatar
  • POST /api/agent/shorts/merge
Not in public MCP v1 (still available in Agent API): PUT /api/agent/settings, GET /api/agent/schedule/suggest.

Account & Auth

Register Agent

Request:
Response:

Get Agent Info

Response:

Health Check (Infrastructure)

Response:

Operational Status Snapshot

Response (shape excerpt):

Rotate API Key

Response:

Settings

Get Agent Settings

Response: full AgentSettings object (see SETTINGS.md)

Update Agent Settings

API availability: yes. MCP v1 public exposure: advanced/deferred (web-first by default). Request: partial AgentSettings (any fields, all optional):
Response: updated AgentSettings

Switch Image Style

Request:
Values: minimal | tech | bold

Content Creation

Create Micro-Post

Creates a social-only post (does not go to blog). Generates social adaptation stubs per platform. Request:
Response:

Generate Blog Article (Autopilot)

Request:
Sizes: mini (7 credits) | standard (12 credits) | full (25 credits) | pillar (40 credits) Plus CI intelligence: +8 credits

Create Social Adaptation

Adapt an existing article for specific social platforms. Request:

Publishing & Scheduling

Publish Content

Request for immediate publish:
Request for scheduled publish:
Request to cancel:
Response:

Get Schedule (Timeline)

Query params: from (ISO date), to (ISO date) Response:

Get Schedule Gaps

Returns days within the next 7 days that have fewer posts than postsPerDay setting. Response:

Get Suggested Posting Slots

API availability: yes. MCP v1 public exposure: advanced/deferred. Returns optimal times for tenant’s timezone based on best-practice engagement windows. Response:

Trend Scanning

Request:
Mode values: fast | deep | ultra | ultra+ Default mode derived from scanSources in Agent Settings if not specified. Max limit: 30 Response:
knowledgeMatch is only present when tenant has product knowledge documents uploaded and a match is found.

Product Knowledge Base

Upload Document

Accepts text content or a URL. Content is chunked, embedded (Gemini), and stored in pgvector. Request (text):
Request (URL):
Response:

List Documents

Response:

Delete Document

Deletes document, all chunks, and Redis cache. Tenant ownership verified before delete. Response: 204 No Content

Search Knowledge Base

Request:
Response:

Video (Shorts)

See SHORTS-PIPELINE.md for full pipeline documentation.

Generate Video

Fire-and-forget. Returns generationId immediately; poll for status. Request:
Response:

Poll Video Status

Response (generating):
Response (completed):
Response (failed):

Generate Script

API availability: yes. MCP v1 public exposure: yes. Request:
Fields:
  • topic: string (required)
  • style: hook | educational | cta (default: hook)
  • product_id: UUID (optional) — link to a product knowledge document
  • duration: short | long (optional, default: short)
  • language: language code (optional, default: "en")
Response:

Generate Avatar

API availability: yes. MCP v1 public exposure: yes. Request:
Fields:
  • gender: male | female
  • origin: european | asian | african | latin | middle_eastern | south_asian
  • age_range: 18-25 | 26-35 | 36-50 (default: 26-35)
  • type: tech_founder | vibe_coder | student | executive (default: tech_founder)
  • location: coffee_shop | dev_cave | street | car | home_office | podcast_studio | glass_office | rooftop | bedroom | park | gym (default: coffee_shop)
Response:
Provider chain: geminiopenai-highbytedancezai

Merge Video Segments

API availability: yes. MCP v1 public exposure: yes. Merges 2 or more video segments, trims silence, applies audio crossfade, renders subtitles. Request:
Response:

Intelligence & Research

Content Gaps — Generate

Request:
Fields:
  • competitor_urls: string[] (1-5 URLs, validated for SSRF) — required
  • favorite_id: UUID (optional, since 2026-05-04) — scope gaps to a specific ai_favorites row (product/identity). When present:
    • owner-checked against ai_favorites WHERE id=? AND tenant_id=? before charge — cross-tenant ID returns 403 with no credits used
    • analysis domain is overridden to ai_favorites.domain instead of the legacy ${blog_handle}.citedy.com
    • each persisted ai_content_gaps row is tagged with this favorite_id
Response:
Status codes: 200 / 400 (validation, no blog/favorite) / 401 / 402 (insufficient credits) / 403 (cross-tenant favorite_id) / 429 (10/hour rate limit) / 500.

Content Gaps — List

Query params (all optional):
  • favorite_id: UUID — scope to a specific favorite. Hybrid filter: returns rows tagged with this favorite or legacy NULL rows whose domain matches the favorite’s domain (so pre-favorite gaps are not lost from the view).
  • limit: integer 1-100 (default 100).
Response:
Status codes: 200 / 400 (bad query params) / 401 / 403 (cross-tenant favorite_id) / 429 / 500.

Competitor Discovery


Competitor Scout


X Intent Scout


Reddit Intent Scout


Content Ingestion

Ingest URL / Video

Request:
Types and costs:
  • web_article: 1 credit
  • pdf_document: 2 credits
  • youtube_video: 5-55 credits (by duration)
  • audio_file: 3-30 credits (by duration)

Get Ingested Content


Lead Magnets

Generate Lead Magnet

Types: checklist | swipe_file | framework

Get Lead Magnet


Personas

List Personas


Webhooks

Manage Webhooks

Webhook events: post.published, post.scheduled, video.completed, video.failed, scan.completed

Error Responses

All errors follow:
Common codes:
HTTPCodeMeaning
400VALIDATION_ERRORInvalid request body
401UNAUTHORIZEDMissing or invalid API key
402INSUFFICIENT_CREDITSNot enough credits
403FORBIDDENResource belongs to another tenant
429RATE_LIMITEDToo many requests
503SERVICE_UNAVAILABLERedis or external provider unavailable
Insufficient credits response also includes: