Build with the AIWriter API
Integrate powerful AI content generation into your applications. RESTful API with simple authentication, streaming responses, and comprehensive documentation.
Quick Start
Get up and running with the AIWriter API in minutes. Here's everything you need to make your first API call.
Get your API key
Sign up for an account and navigate to Settings > API Keys to generate your key.
Install the SDK (optional)
Use our official SDKs for Python, Node.js, or make direct HTTP requests.
Make your first request
Send a POST request to the completions endpoint with your prompt.
curl https://api.aiwriter.com/v1/completions \
-H "Authorization: Bearer $AIWRITER_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "aiwriter-pro",
"prompt": "Write a product description for:",
"max_tokens": 500,
"temperature": 0.7
}'
Authentication
All API requests require authentication using Bearer tokens. Include your API key in the Authorization header.
Request Headers
| Header | Value |
|---|---|
| Authorization | Bearer YOUR_API_KEY |
| Content-Type | application/json |
Keep your API key secure
Never expose your API key in client-side code. Always make API calls from your backend.
import aiwriter
# Initialize the client
client = aiwriter.Client(
api_key="your-api-key"
)
# Make a request
response = client.completions.create(
model="aiwriter-pro",
prompt="Write a tagline for:",
max_tokens=100
)
print(response.text)
API Endpoints
The AIWriter API provides several endpoints for different content generation tasks.
/v1/completions
Create Completion
Generate text based on a prompt. Supports multiple AI models and customization options.
Parameters
model
The AI model to use (aiwriter-pro, aiwriter-fast, gpt-4-turbo, claude-3-opus)
prompt
The input text to generate a completion for
max_tokens
Maximum number of tokens to generate (default: 500)
temperature
Sampling temperature between 0 and 2 (default: 0.7)
/v1/templates
Generate from Template
Generate content using pre-built templates for common use cases like blog posts, emails, and ads.
Parameters
template_id
The ID of the template to use (blog-post, email-marketing, product-description)
variables
Object containing template-specific variables
/v1/models
List Models
Retrieve a list of available AI models and their capabilities.
/v1/usage
Get Usage Statistics
Retrieve your API usage statistics including token counts and request history.
Official SDKs
Use our official client libraries to integrate AIWriter into your application quickly.
Rate Limits
API rate limits vary by plan. Here's what you get with each tier.
| Plan | Requests/min | Tokens/month | Concurrent requests |
|---|---|---|---|
| Free | 20 | 10,000 | 1 |
| Pro | 100 | 500,000 | 5 |
| Enterprise | Unlimited | Unlimited | Unlimited |
Ready to Build?
Get your API key and start integrating AI content generation into your application today.