Skip to navigation

Rewrite text

Drafts a rewrite of the caller’s text in the requested tone and length, for them to review. | authz: allowed_org_types=[shipper, provider], min_org_role=operator | (AIRewriteReq) -> (AIRewriteRes)

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Request

This endpoint expects an object.
textstringRequired1-20000 characters

The text to rewrite: typed, dictated, or pasted.

effortenumOptional
How much effort goes into the rewrite. Higher is slower and more careful.
Allowed values:
lengthenumOptional
How long the rewrite is, relative to the text.
Allowed values:
toneenumOptional
Allowed values:
user_promptstring or nullOptional<=2000 characters
Freeform instructions for this rewrite, such as who it's for. They take precedence over tone and length.

Response

Successful Response
rewritten_textstring

Errors

422
Unprocessable Entity Error