apiREST API
GenPosts API
Integrate GenPosts content generation into your apps, scripts and automations.
Base URL
https://genposts.app/api/v1
lockAuthentication
All requests require your API key in the Authorization header.
Authorization: Bearer YOUR_API_KEY
Also you can use header X-Api-Key: YOUR_API_KEY
apiEndpoints
| Method | Endpoint | Description |
|---|---|---|
| POST | /generate |
Generate content with a tool and return the result. |
| GET | /tools |
Lists the available tools and their fields. |
| GET | /me |
Returns your account: word/credit balance, plan and request limit. |
terminalExample: generate content
Send the tool and its fields; is billed for the words produced.
curl -X POST https://genposts.app/api/v1/generate \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"tool":"article","fields":{"title":"Guía de email marketing","keywords":"email marketing, automatización","article_type":"guide","intent":"informational","tone":"professional","length":"2000"},"language":"es"}'
tuneArticle fields
Fields accepted by the "article" tool in "fields". Only "title" is required; the rest are optional.
| Field | Type | Mandatory | Supported values |
|---|---|---|---|
title |
text | ✓ | — |
keywords |
text | — | — |
article_type |
select | — | blog_post, guide, comparison, review, tutorial, listicle, pillar_page, case_study |
intent |
select | — | informational, commercial, transactional |
note |
textarea | — | — |
tone |
select | — | professional, casual, friendly, persuasive, informative, authoritative, humorous, inspirational, formal, conversational |
length |
select | — | 1000, 2000, 3000 |
Query the fields of any tool with GET /tools.
data_objectAnswer
The API returns JSON with the result and the words consumed.
{
"ok": true,
"tool": "article",
"result": "<h1>…</h1>",
"words_used": 1240,
"words_balance": 8760,
"generation_id": 482
}
errorErrors
| Code | Meaning |
|---|---|
401 | Missing or invalid API key. |
402 | You don't have enough words left. |
403 | Your plan does not allow access to the API. |
422 | Missing or invalid parameters. |
429 | Too many requests; wait a moment. |

