generation

Paraphrase text (deprecated)

DEPRECATED: use /api/v1/rephrase with mapping="paraphrase". Rewrites text with a chosen transformation, exactly like /api/v1/rephrase but under its own rate-limit bucket. Input is limited to 4000 characters.

post/api/v1/paraphrase

Request

  • Base URL: https://api.sapling.ai
  • URL: https://api.sapling.ai/api/v1/paraphrase
  • Auth: one of:
    • HTTP bearer
    • none

Request body

keystring

Sapling API key. Required when no "Authorization: Bearer <key>" header is sent; when both are sent, the body key takes precedence over the header.

mapping'paraphrase' | 'passive_to_active' | 'active_to_passive' | 'informal_to_formal' | 'formal_to_informal' | 'sentence_split' | 'reword' | 'generate_title' | 'generate_acronym' | 'generate_meta_description' | 'summarize' | 'expand' | 'shorten' | 'switch_tone' | 'switch_tense'

Transformation to apply. Defaults to "paraphrase".

num_resultsinteger

Number of alternatives to return (default 5).

return_usageboolean

When true, a successful JSON-object response additionally carries "usage": {"characters": <n>} — the billable character count this request submitted (0 for unbilled requests; the 2.5x adjustment for logographic languages is included, so CJK requests report more than their raw length). Repeat texts inside the billing deduplication window are still counted here even though they are not re-charged, so the number is an upper bound on the final charge. Responses whose body is not a JSON object (e.g. bare-array response formats) cannot carry the field. An existing usage field (such as account/status or completion token usage) is preserved unchanged.

tense_mapping'simple past' | 'past perfect' | 'past continuous' | 'past perfect continuous' | 'simple present' | 'present perfect' | 'present continuous' | 'present perfect continuous' | 'simple future' | 'future perfect' | 'future continuous' | 'future perfect continuous'

Target tense. Only used with mapping="switch_tense".

textstring required

The text to process. Plain text or HTML (tags are handled server-side).

tone_mapping'straightforward' | 'confident' | 'friendly' | 'empathetic' | 'professional' | 'casual' | 'diplomatic' | 'persuasive'

Target tone. Only used with mapping="switch_tone".

Response

Alternatives: {"results": [{hash, original, replacement, rephrase_type, model_version}]}.

Changes

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