Skip to main content
The AI Content API provides AI-generated content suggestions based on audit results and specified topics.

Generate Content Suggestions

This endpoint requires authentication and audit ownership verification.

POST /api/v1/ai-content/generate/{audit_id}

Generate AI-powered content suggestions for a specific audit.
audit_id
integer
required
ID of the audit to generate suggestions for
domain
string
required
Domain to generate content for (e.g., “example.com”)
topics
array
required
List of topics to generate content suggestions for

Response

Returns an array of AI content suggestions:
id
integer
Unique suggestion ID
audit_id
integer
Associated audit ID
topic
string
The topic this suggestion addresses
title
string
Suggested content title
content_type
string
Type of content (e.g., “blog_post”, “guide”, “tutorial”)
outline
array
Suggested content outline with sections
keywords
array
Recommended keywords to target
created_at
string
Timestamp when the suggestion was created

Example Request

curl -X POST "https://api.example.com/api/v1/ai-content/generate/123?domain=example.com" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "topics": [
      "SEO best practices",
      "Technical SEO checklist",
      "Content optimization strategies"
    ]
  }'

Example Response

[
  {
    "id": 1,
    "audit_id": 123,
    "topic": "SEO best practices",
    "title": "10 Essential SEO Best Practices for 2024",
    "content_type": "blog_post",
    "outline": [
      "Introduction to modern SEO",
      "Technical optimization fundamentals",
      "Content quality signals",
      "User experience factors",
      "Conclusion and action items"
    ],
    "keywords": [
      "SEO best practices",
      "search engine optimization",
      "SEO techniques 2024"
    ],
    "created_at": "2024-03-15T10:30:00Z"
  }
]

Get Saved Suggestions

GET /api/v1/ai-content/{audit_id}

Retrieve previously generated content suggestions for an audit.
audit_id
integer
required
ID of the audit

Example Request

curl -X GET https://api.example.com/api/v1/ai-content/123 \
  -H "Authorization: Bearer YOUR_TOKEN"

Error Codes

CodeDescription
401Missing or invalid authentication token
403User does not own the specified audit
404Audit not found
502AI generation failed (Kimi API error)
503AI provider unavailable (check NV_API_KEY configuration)
The AI Content API requires the Kimi AI provider to be configured. Ensure NV_API_KEY_ANALYSIS, NVIDIA_API_KEY, or NV_API_KEY environment variable is set.

Provider Configuration

The AI Content service uses NVIDIA’s Kimi provider for content generation. Error responses include specific error codes:
  • KIMI_UNAVAILABLE: Provider not configured
  • KIMI_GENERATION_FAILED: Generation request failed

Next Steps

GEO API

Generate GEO-optimized articles

Audits API

Manage audit configurations

Build docs developers (and LLMs) love