/v1/ai/generate
These endpoints support the content side of your AI visibility workflow — creating and improving pages that help AI models mention and cite your brand. For visibility reporting, see AI visibility endpoints.
POST /text
Generate content from a prompt. Use this to create pages targeting prompts from your visibility report.
Body:
| Field | Type | Required | Description |
|---|---|---|---|
text | string | Yes | Prompt / user message |
model | string | Yes | Model ID (OpenAI, Anthropic, or Gemini family) |
systemPrompt | string | No | Custom system instructions |
brandVoiceId | string | No | Apply a saved brand voice |
brandVoice | boolean | No | Enable brand voice context |
file | string | No | Attachment reference for context |
useWorker | boolean | No | Queue async job instead of synchronous response |
jobType | string | No | Worker job name when useWorker is true (default: ai_tool_content) |
options | object | No | Extra options passed to the worker |
useWorker: true:
POST /chat
Conversational AI with workspace visibility context. Enable useWorkspaceContext to include your latest visibility scores, traffic data, and documents.
Body:
| Field | Type | Required | Description |
|---|---|---|---|
text | string | Yes | User message |
model | string | Yes | Model ID |
sessionId | string | No | Existing chat session (created if omitted) |
systemPrompt | string | No | Custom system prompt |
useWorkspaceContext | boolean | No | Include visibility and workspace data (default: true) |
brandVoiceId | string | No | Brand voice context |
webpageContext | string | No | Raw page text for context |
webSearch | boolean | No | Enable web search (OpenAI models only) |
POST /calculate-seo-score
Score content for SEO before publishing visibility-optimized pages.
Body:
| Field | Type | Required | Description |
|---|---|---|---|
content | string | Yes | Body text to analyze |
title | string | No | Page title |
keywords | string[] | No | Target keywords from your visibility report |
autoExtractKeywords | boolean | No | Extract keywords when none provided (default: true) |
POST /improve-content-simple
Single-pass AI content improvement with before/after SEO scores. Use on existing pages that underperform in visibility reports.
Body:
| Field | Type | Required | Description |
|---|---|---|---|
content | string | Yes | Content to improve |
improvePrompt | string | Yes | Improvement instructions |
metricType | string | No | Metric label (default: general) |
POST /improve-content-with-validation
Iterative content improvement with validation. Requires a paid plan.
POST /process-blog-post-with-images
Process a blog post and generate associated images.
POST /image
Generate an image.
Body:
| Field | Type | Required | Description |
|---|---|---|---|
text | string | Yes | Image prompt |
model | string | Yes | dall-e-3 or stability-ultra |
size | string | Yes | DALL·E size (e.g. 1024x1024) or Stability aspect ratio |
data.
Brand voice (generate routes)
Create brand voices that keep visibility-optimized content on-brand.| Method | Endpoint | Description |
|---|---|---|
POST | /brand-voice/website | Generate brand voice from a website URL |
POST | /brand-voice/text | Generate brand voice from sample text |
POST | /brand-voice/file | Generate brand voice from an uploaded file |
POST /feedback
Submit feedback on AI output quality.
GET /job/:jobId
Poll async job status (content, SEO, or AI queues).
Response (200):
waiting, active, completed, failed, etc.