Text

Run a text tool

Runs one of the tools listed by GET /v1/text/tools against your input text. One stateless call; billing is metered on ACTUAL token usage, not a flat rate, and the response returns the token counts and the cost breakdown it charged on.

There is deliberately no free-form prompt escape hatch and no prompt-preview route: both would publish internal prompt engineering to any token holder.

post/v1/text/generate

Request

  • Base URL: https://contentmaschine.ai/api
  • URL: https://contentmaschine.ai/api/v1/text/generate
  • Auth: one of:
    • HTTP bearer
    • OAuth 2 (authorization code, authorization URL https://contentmaschine.ai/api/oauth/authorize, token URL https://contentmaschine.ai/api/oauth/token)

Request body

tool_keystring required

A key from GET /v1/text/tools.

input_textstring required

The text the tool operates on.

optionsobject

Per-tool options.

framework_idinteger

Optional StoryBrand framework (integer id) to condition the output on. Must be one you own.

source_typestring

Provenance label. Defaults to "direct".

source_idinteger

Optional integer id of the source record.

source_uuidstring

Optional uuid of the source record.

Response

The tool output.

successboolean
timestampstring date-time

Example response

{
  "success": true
}

Changes

No recorded changes to this operation across all 1 revision of this API.