AI
http://localhost:4000/api/v1 /ai/draft Write a post from a brief, a text or a web page
Without channelIds one generic post is written. With autoHashtag hashtags are added at hashtagPosition (hashtagCount 1 to 10). The result is not saved: use POST /posts with action: draft.
Request body
application/json
brieftexturlchannelIdsthreadautoHashtaghashtagCounthashtagPosition{
"brief": "string",
"text": "string",
"url": "string",
"channelIds": [],
"thread": false,
"autoHashtag": false,
"hashtagCount": 5,
"hashtagPosition": "end"
}Code samples
cURL
curl -X POST "http://localhost:4000/api/v1/ai/draft" \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{"brief":"string","text":"string","url":"string","channelIds":[],"thread":false,"autoHashtag":false,"hashtagCount":5,"hashtagPosition":"end"}'TypeScript
Python
Go
PHP
Ruby
Java
Responses
Example
{}Option 1
{}Option 2
{}http://localhost:4000/api/v1 /ai/rewrite Change a post, or a passage of it, by any instruction
instruction is free text ('make it funnier'). With selection only that passage changes and the rest comes back as it was. command also applies the member's standing instruction for that built-in command.
Request body
application/json
textselectioninstructioncommandchannelId{
"text": "string",
"selection": "string",
"instruction": "string",
"command": "rewrite",
"channelId": "string"
}Code samples
cURL
curl -X POST "http://localhost:4000/api/v1/ai/rewrite" \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{"text":"string","selection":"string","instruction":"string","command":"rewrite","channelId":"string"}'TypeScript
Python
Go
PHP
Ruby
Java
Responses
Example
{}Option 1
{}Option 2
{}http://localhost:4000/api/v1 /ai/translate Translate a post into one or more languages
Tone, links and mentions are kept; with channelId each result fits that channel's limit.
Request body
application/json
textlanguageschannelId{
"text": "string",
"languages": [
"string"
],
"channelId": "string"
}Code samples
cURL
curl -X POST "http://localhost:4000/api/v1/ai/translate" \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{"text":"string","languages":["string"],"channelId":"string"}'TypeScript
Python
Go
PHP
Ruby
Java
Responses
Example
{}Option 1
{}Option 2
{}http://localhost:4000/api/v1 /ai/hashtags Suggest hashtags for a post
max 1 to 10. position says where text would carry them (end or start); withHashtags is the text with them placed. With mediaIds and a vision-capable model the pictures are read too.
Request body
application/json
textmaxpositionmediaIds{
"text": "string",
"max": 5,
"position": "end",
"mediaIds": []
}Code samples
cURL
curl -X POST "http://localhost:4000/api/v1/ai/hashtags" \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{"text":"string","max":5,"position":"end","mediaIds":[]}'TypeScript
Python
Go
PHP
Ruby
Java
Responses
Example
{}Option 1
{}Option 2
{}http://localhost:4000/api/v1 /ai/alt-text Write alt text for pictures in the media library
One entry per picture; files that are not pictures the model reads are left out.
Request body
application/json
mediaIdspostText{
"mediaIds": [
"string"
],
"postText": "string"
}Code samples
cURL
curl -X POST "http://localhost:4000/api/v1/ai/alt-text" \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{"mediaIds":["string"],"postText":"string"}'TypeScript
Python
Go
PHP
Ruby
Java
Responses
Example
{}Option 1
{}Option 2
{}http://localhost:4000/api/v1 /ai/transcribe Transcribe an audio or video file
data is the file in base64 (25 MB at most). Needs a transcription service on the server.
Request body
application/json
namemimedatalanguage{
"name": "string",
"mime": "string",
"data": "string",
"language": "string"
}Code samples
cURL
curl -X POST "http://localhost:4000/api/v1/ai/transcribe" \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{"name":"string","mime":"string","data":"string","language":"string"}'TypeScript
Python
Go
PHP
Ruby
Java
Responses
Example
{}Option 1
{}Option 2
{}http://localhost:4000/api/v1 /ai/check Check a text for harmful content
Flags hate, harassment, sexual, violence and self-harm, each with a reason when flagged. The workspace's rule checks are part of POST /posts/validate.
Request body
application/json
text{
"text": "string"
}Code samples
cURL
curl -X POST "http://localhost:4000/api/v1/ai/check" \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{"text":"string"}'TypeScript
Python
Go
PHP
Ruby
Java
Responses
Example
{}Option 1
{}Option 2
{}http://localhost:4000/api/v1 /ai/score Predict how a draft will engage on a channel
score is 0 to 100 (50 = an average post of that channel). basis is history when the channel's own past posts were enough, else ai with lowData. reasons are the two main ones.
Request body
application/json
textchannelIdatmediaIds{
"text": "string",
"channelId": "string",
"at": "2024-01-01T00:00:00Z",
"mediaIds": []
}Code samples
cURL
curl -X POST "http://localhost:4000/api/v1/ai/score" \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{"text":"string","channelId":"string","at":"2024-01-01T00:00:00Z","mediaIds":[]}'TypeScript
Python
Go
PHP
Ruby
Java
Responses
Example
{}Option 1
{}Option 2
{}