Skip to main content
POST
/
ai-agent
/
transform-text
Transform text
curl --request POST \
  --url https://app.myhero.so/ai-agent/transform-text \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "text": "<string>",
  "operation": "rephrase",
  "language": "FR"
}
'
{
  "text": "<string>",
  "usage": {
    "promptTokens": 1,
    "completionTokens": 1,
    "totalTokens": 1
  }
}

Documentation Index

Fetch the complete documentation index at: https://developers.myhero.so/llms.txt

Use this file to discover all available pages before exploring further.

Applies a named transformation (operation) to the provided text and returns the rewritten string along with token usage. Supported operations include rephrase, fix grammar, simplify, translate, shorten, summarize, and others.

Authorizations

Authorization
string
header
required

HERO personal access token

Body

application/json
text
string
required
Minimum string length: 1
operation
enum<string>
required
Available options:
rephrase,
restructure,
keypoints,
fixGrammar,
simplify,
professionalize,
bloggify,
emojify,
translate,
extend,
shorten,
complete,
summarize,
tldr
language
enum<string>
Available options:
FR,
EN

Response

200 response

text
string
required
usage
object