Getting Started
Welcome to the NexPost API! Our REST API allows you to programmatically generate engaging social media content using advanced AI technology. Get started in just a few minutes.
1 Get Your API Key
Sign up for a NexPost account and generate your API key from the Settings page.
Generate API Key β2 Make Your First Request
Use our interactive API explorer below to test endpoints and see responses.
Try API Explorer βQuick Start Example
curl -X POST https://nexpost.io/api/content/generate-post \\
-H "Content-Type: application/json" \\
-H "x-api-key: YOUR_API_KEY" \\
-d '{
"contentType": "linkedin",
"topic": "AI in marketing",
"description": "Write about benefits of AI automation"
}'Base URL
https://nexpost.io/apiAll API requests should be made to this base URL with the appropriate endpoint path.
API Authorization
To use the API, you need an API key. You can find it in the Settings section.
Include the key in the header of each request: x-api-key: YOUR_API_KEY
π‘ Testing Tip: Click the "Authorize" button in the API documentation below to add your API key and test endpoints directly!
Interactive API Documentation
Below you'll find interactive documentation for all available API endpoints. You can test the endpoints directly from this interface.
Code Examples
Generate LinkedIn Post
curl -X POST https://nexpost.io/api/content/generate-post \\
-H "Content-Type: application/json" \\
-H "x-api-key: YOUR_API_KEY" \\
-d '{
"contentType": "linkedin",
"topic": "Remote work productivity",
"description": "Share tips for effective work from home",
"streaming": false
}'Generate Post from Image
curl -X POST https://nexpost.io/api/content/generate-custom-post \\
-H "Content-Type: application/json" \\
-H "x-api-key: YOUR_API_KEY" \\
-d '{
"contentType": "instagram",
"imageBase64": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg==",
"imageMimeType": "image/png",
"imageDescription": "Simple test image",
"streaming": false
}'Generate Content Topics
curl -X POST https://nexpost.io/api/content/generate-topics \\
-H "Content-Type: application/json" \\
-H "x-api-key: YOUR_API_KEY" \\
-d '{
"limit": 10,
"description": "remote work productivity tips"
}'Example Response
{
"success": true,
"content": "π Remote work isn't just a trendβit's the future of productivity!\\n\\nHere are my top 5 tips for staying productive while working from home:\\n\\nβ
Create a dedicated workspace\\nβ
Set clear boundaries with family/roommates\\nβ
Use time-blocking for focused work sessions\\nβ
Take regular breaks to avoid burnout\\nβ
Invest in good lighting and ergonomic setup\\n\\nWhat's your #1 remote work productivity hack? Share below! π\\n\\n#RemoteWork #Productivity #WorkFromHome #DigitalNomad",
"contentType": "linkedin",
"topic": "Remote work productivity"
}System Status
Monitor the health and availability of NexPost API services in real-time. Check individual service components and overall system status.
Live Status
Service Components
Status Endpoint
GET https://nexpost.io/api/statusExample Response
{
"status": "healthy",
"message": "NexPost API is operational",
"timestamp": "2025-01-29T10:30:00.000Z",
"version": "1.0.0",
"uptime": 86400,
"responseTime": 45,
"services": {
"database": "connected",
"ai_service": "operational"
}
}Troubleshooting
Common Error Responses
Unauthorized - Invalid API Key
Your API key is missing, invalid, or has been revoked.
Solution: Check your API key in the Settings page and ensure it's included in the x-api-key header.
Rate Limited
You've exceeded your rate limit for API requests.
Solution: Wait before making another request. Each account has 100 requests per month limit.
Bad Request - Missing Parameters
Required parameters are missing from your request.
Solution: Ensure all required fields (contentType, topic) are included in your request body.
Internal Server Error
Something went wrong on our end while processing your request.
Solution: Try again in a few moments. If the issue persists, contact support.
Debug Checklist
Need More Help?
If you're still experiencing issues after checking the troubleshooting guide, we're here to help you get back on track.
Email SupportFrequently Asked Questions
How do I get an API key?
You can generate your API key by going to the Settings page in your NexPost dashboard. Click on "Generate Key" to create a new API key.
What social media platforms are supported?
Our API supports content generation for LinkedIn, Twitter, Instagram, and Facebook. Each platform has optimized content formats and character limits.
Is there rate limiting on the API?
Yes, API calls are rate limited. Each account has a limit of 100 requests per month.