Back to Home

API Documentation

Integrate AI text generation into your applications with our simple REST API.

Authentication

All API requests require authentication using an API key in the header.

curl -X POST https://api.aitextgen.com/v1/generate \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json"
Generate Content

Generate AI content using our primary endpoint.

Endpoint

POST /v1/generate

Request Body

{
"template": "blog",
"topic": "AI in healthcare",
"tone": "professional",
"length": "medium"
}

Response

{
"success": true,
"content": "Generated content here...",
"word_count": 342,
"generation_time": 1.2
}
Parameters

template

Content template type: blog, email, social, ad, product, press

topic

The subject or topic for content generation

tone

Writing tone: professional, casual, friendly, formal, creative, persuasive

length

Content length: short, medium, long

Quick Start
  1. 1Sign up for an API key
  2. 2Make your first API call
  3. 3Integrate into your app
Rate Limits
Free Plan:100/day
Pro Plan:10,000/day
Enterprise:Unlimited
SDKs
• JavaScript/Node.js
• Python
• PHP
• Ruby
• Go
    Built with v0