Create a rewrite
Rewrite up to 20,000 words or use direct mode for up to 4,000 words. Maximum 200,000 characters. Reserve max(input_words, 100) words. All REST calls share 60 requests per minute per key. New jobs share 10 per minute per user. Unknown fields are rejected. Unicode, word counts, lock occurrences and cross-field rules are checked by the service.
BearerAuthorizationBearer <token>Ink API key from /app/api-keys.
Idempotency-Key*stringReuse a UUID for the same request. A changed request with the same UUID returns idempotency_conflict.
uuidapplication/json- body
mode?string"rewrite""rewrite""direct"text*stringsettings?locks?array<string>unlocks?array<string>profile?|"shared"Finished job. Review warnings and needs_review before using output.
application/json- response
id*stringuuidstatus*unknown"queued""rewriting""validating""completed""completed_with_warnings""needs_review""failed""cancelled"mode?unknown"rewrite""direct"output?stringchange_summary?stringinput_words*integer0 <= valuecharged_words*integer0 <= valuerefunded_words?integer0 <= valuecreated_at*stringdate-timefinished_at*|date-timewarnings*array<>Deliver output with its warnings. On details_added, show the warning listing added details: "Check added details before use: ...". On first_person_added, show the warning listing added first-person words: "Added first-person wording: ..." or, when the list is absent, "Added first-person wording. Check the rewrite.". Do not retry details_added, first_person_added or sections_kept automatically. For the new rewrite policy, light and balanced deliver persistent first-person additions with completed_with_warnings; missing contains unique lowercase words with straight apostrophes. Strong keeps the affected source section and refunds it through sections_kept. These checks do not apply to older saved policies, REST direct mode or writing from a prompt. See /docs/api#first-person-wording for source context rules and the quotation limit. Rewrite meaning checks run silently with OpenAI when configured and may use one shared retry per section. Light and balanced deliver persistent meaning problems silently. Strong keeps and refunds a section through sections_kept only for a persistent critical added claim, changed fact or speaker problem. Material findings are delivered silently. Older saved policies keep their behavior. Unavailable checks fail open.
blocks*array<>progress*fact_report?error?curl -X POST 'https://ink.ego.ist/api/v1/rewrites' \
-H 'Idempotency-Key: 497f6eca-6276-4993-bfeb-53cbbbba6f08' \
-H 'Content-Type: application/json' \
-d '{
"text": "string"
}'{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"status": "queued",
"mode": "rewrite",
"output": "string",
"change_summary": "string",
"input_words": 0,
"charged_words": 0,
"refunded_words": 0,
"created_at": "2019-08-24T14:15:22Z",
"finished_at": "2019-08-24T14:15:22Z",
"warnings": [
{
"code": "string",
"message": "string",
"missing": [
"string"
],
"missing_count": 0
}
],
"blocks": [
{
"index": 0,
"text": "string"
}
],
"progress": {
"phase": "queued",
"blocks_done": 0,
"blocks_total": 0
},
"fact_report": {
"total": 0,
"kept": 0,
"groups": [
{
"type": "string",
"total": 0,
"kept": 0
}
],
"changed": [
{
"text": "string",
"type": "string"
}
]
},
"error": {
"code": "string",
"message": "string"
}
}