API Documentation
Integrate CaptionCraft's AI-powered caption generation into your applications with our simple REST API.
Fast & Reliable
Secure Authentication
RESTful API
Getting Started
1. Get API Key
Sign up for a Pro account to get your API key
2. Make Requests
Use your API key to authenticate requests
Authorization: Bearer YOUR_API_KEY
3. Generate Captions
Start generating AI captions programmatically
API Endpoints
POST
/api/captions/generate
Generate AI captions for an image
Parameters:
imageUrl
mood
description (optional)
GET
/api/captions
Retrieve user's generated captions
Parameters:
limit (optional)
offset (optional)
DELETE
/api/captions/:id
Delete a specific caption
Parameters:
id (path parameter)
Code Examples
Generate Captions
JavaScript example using fetch API
const response = await fetch('/api/captions/generate', { method: 'POST', headers: { 'Content-Type': 'application/json', 'Authorization': 'Bearer YOUR_API_KEY' }, body: JSON.stringify({ imageUrl: 'https://example.com/image.jpg', mood: 'Professional', description: 'Business meeting photo' }) }); const data = await response.json(); console.log(data.captions);
Need help integrating our API? We're here to help!