# Overview

Ink writes from a prompt or rewrites supplied text with the shared Ink model. Rewrites check names, numbers, dates, quotes, citations and links, and show what changed. Review the result before using it. The shared model is not a trained personal voice.

## Choose a connection

* [MCP](https://ink.ego.ist/docs/mcp): connect an assistant with Ink OAuth and the person's consent.
* [REST API](https://ink.ego.ist/docs/api): use a Bearer API key from a paid account after trial.
* [Agent signup](https://ink.ego.ist/docs/agent-signup): start a subscription handoff with a claim link. Signup does not authorize an assistant.

## Make a request

Create a key in [API keys](https://ink.ego.ist/app/api-keys), then send a draft and a fresh UUID:

```sh
curl https://ink.ego.ist/api/v1/rewrites \
  -H "Authorization: Bearer $INK_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"text":"Please review the attached proposal.","settings":{"strength":"balanced"}}'
```

HTTP 200 returns a finished job. HTTP 202 returns a pending job; poll the `Location` URL with the same key. See [create and poll](https://ink.ego.ist/docs/api#create-and-poll) and the [endpoint reference](https://ink.ego.ist/docs/api/reference/create-rewrite).

## Read as markdown

Every page has a Copy as markdown button and a `.md` URL. Request `Accept: text/markdown` on a page URL for the same content. [llms.txt](https://ink.ego.ist/llms.txt) indexes public pages, [llms-full.txt](https://ink.ego.ist/llms-full.txt) contains these docs, and [auth.md](https://ink.ego.ist/auth.md) describes the signup handoff. The [OpenAPI document](https://ink.ego.ist/docs/openapi.json) describes the REST endpoints.

Source: https://ink.ego.ist/docs


---

# Agent signup

With the person's permission, POST their email to `https://ink.ego.ist/api/agent/signup`. This public JSON endpoint needs no API key or cookies.

```json
{"email":"person@example.com","plan":"ink","interval":"monthly","agent":{"name":"Example agent","url":"https://example.com","version":"1.0"}}
```

Only `email` is required. `plan` is `ink` or `ink_pro` (default `ink`); `interval` is `monthly` or `annual` (default `monthly`). When `agent` is supplied, `name` is required; its HTTPS URL and version are optional. Email is trimmed and lowercased. Validation uses syntax and a local list of temporary domains, without network lookups. Unknown fields are rejected. The request body allows 4,096 bytes.

## Hand off to the person

HTTP 201 returns `claim_code`, `claim_url`, `expires_at` and `next_steps`. Show the link and eight-character code to the person. No email is sent. Existing and new emails receive the same response shape; never infer account existence.

The person opens the link or the [claim page](https://ink.ego.ist/claim), signs in or signs up through ego.ist with the supplied email, accepts Ink terms and continues to Stripe Checkout. Card entry always needs the person. Claims expire after 24 hours and allow 5 failed attempts.

The code grants no account access, assistant authorization or Passport memory permission. No tokens are issued by signup. WorkOS identity_assertion, service_auth, anonymous registration, assertion exchange and claim polling are not supported. [MCP authorization](https://ink.ego.ist/docs/mcp) is a separate consent step.

## Plans and trial

| Plan    | Monthly USD | Annual USD | Words per month |
| ------- | ----------- | ---------- | --------------- |
| Ink     | 19          | 190        | 50,000          |
| Ink Pro | 39          | 390        | 200,000         |

Eligible accounts receive one 7-day Stripe trial, card upfront, capped at 10,000 input words. It converts to the chosen paid plan unless cancelled. Returning customers start paid subscriptions. REST API keys require a paid subscription after trial, except for Unlimited accounts.

## Limits and errors

Signup allows 20 requests per IP per hour and 3 per email per hour. Claim confirmation allows 60 per IP per hour and 20 per signed-in user per hour. Do not retry signup in a loop. Wait for `Retry-After` on HTTP 429.

Signup errors use `{"error":"message"}`. Invalid requests return 400, oversized bodies 413, unsupported content types 415 and unavailable signup 503. See the [signup endpoint reference](https://ink.ego.ist/docs/api/reference/agent-signup).

Source: https://ink.ego.ist/docs/agent-signup


---

# MCP and OAuth

The Streamable HTTP endpoint is `https://ink.ego.ist/mcp`. [ChatGPT, Claude and Claude Code setup](https://ink.ego.ist/docs/integrations) use this same endpoint.

## Authorize a client

Discover the [protected resource metadata](https://ink.ego.ist/.well-known/oauth-protected-resource) and [authorization server metadata](https://ink.ego.ist/.well-known/oauth-authorization-server). Public clients use `authorization_code` with S256 PKCE, the MCP resource URL as the resource audience, and either dynamic client registration (DCR) or a client ID metadata document. Discover the authorization, token, registration and revocation URLs from this metadata.

The person signs in and explicitly consents. The only scope is `ink.rewrite`, covering Ink account status, available models, writing tools and owned jobs and results. It grants no Passport memory access. Signup and subscription handoffs do not authorize a client. Refresh tokens rotate; use the newly returned token after each refresh.

Registration allows 30 requests per IP per hour. MCP allows 120 requests per minute per connected user and client. New rewrite jobs share 10 per minute per user across clients. Wait for `Retry-After` when supplied.

## Tools

`ink_get_status`, `ink_rewrite_text`, `ink_write_text`, `ink_get_job`, `ink_get_result`, `ink_cancel_job`

Call `ink_get_status` to check setup and available words. Use `ink_rewrite_text` with `text`, a UUID `idempotency_key` and optional `settings`. Strength defaults to `balanced`; `light` and `strong` are also available. Context is `general`, `work`, `casual` or `academic`; formality is `auto`, `more formal` or `less formal`.

Rewrite input allows 20,000 words and 200,000 characters. Optional `locks` and `unlocks` contain verbatim input strings. Each array allows 100 strings with 20,000 total characters across both arrays. Locks preserve wording; unlocks release automatic highlights, including nested spans. Missing or invalid entries return a validation error. Changing text, settings, mode, profile or locks requires a new idempotency key.

Tools return `setup_required` or `quota_exceeded` with a link to [plans](https://ink.ego.ist/plans). Relay the message and link to the person. [Policies](https://ink.ego.ist/docs/policies) describes `terms_required` and feedback sharing. Feedback tools are available only to the Ink widget on ChatGPT and Claude, not as model-visible tools.

## Meaning checks

Ink silently checks rewrite meaning with OpenAI when configured. Every changed candidate is checked, including retries. A meaning finding can use the section's single shared retry, with source-quote hints. Deterministic guards take precedence when choosing a candidate, then fewer material or critical findings win, with the retry winning a tie. Light and balanced deliver persistent meaning problems silently. Strong keeps and refunds a source section through `sections_kept` only when the chosen candidate still has a critical added claim, changed fact or speaker problem. Material findings are delivered silently; dropped findings can trigger a retry and affect selection but do not keep source by themselves. Unavailable checks fail open. Older saved policies keep their behavior.

## Write from a prompt

Use `ink_write_text` with `prompt` and a UUID `idempotency_key`. Put all instructions in the prompt. Prompts allow 6,000 words, with up to 4,000 output words. Ink reserves available words up to the output cap, charges actual output words and refunds the remainder. Failed or cancelled prompt jobs refund the full reservation. Use a fresh key for another version. Rewrite fidelity checks apply only to rewrites.

## Follow progress

Poll `ink_get_job` and `ink_get_result`. Wait two seconds while `queued` or `starting_model`, then one second while `writing`, `rewriting` or `validating`. Cold starts can take a few minutes. `blocks` contains ordered completed previews; missing indices are pending. `progress` has `phase`, `blocks_done` and `blocks_total`. Partial blocks are not final output. Warnings and `change_summary` are final only.

`completed`, `completed_with_warnings` and `needs_review` are finished results. Deliver warnings with the output. For `details_added`, `first_person_added` or `sections_kept`, do not retry automatically. `failed` has no usable result; `cancelled` is stopped. Use `ink_cancel_job` to request cancellation, then poll until terminal. After text expiry, `output` is absent and `blocks` is empty.

On `details_added`, deliver the output with its warning listing added details. The message is "Check added details before use: ...". On `first_person_added`, deliver the output with its warning listing added first-person words. The message is "Added first-person wording: ..." or, when the list is absent, "Added first-person wording. Check the rewrite.". Light and balanced deliver persistent first-person additions with `completed_with_warnings`; strong keeps the affected source section and refunds it through `sections_kept`. Read the [first-person rules and quotation limit](https://ink.ego.ist/docs/api#first-person-wording).

## Revoke access

Revoke through the discovered revocation endpoint, or choose Disconnect in [Connections](https://ink.ego.ist/app/connections). Disconnect removes the assistant's Ink access. It does not cancel a subscription.

Source: https://ink.ego.ist/docs/mcp


---

# Integrations

## ChatGPT

Open [Ink in the ChatGPT plugin directory ↗](https://chatgpt.com/plugins/ink) and connect your Ink account. The Ink widget can show results and a Compare view. For private use with an eligible developer account, add a connector with `https://ink.ego.ist/mcp` and OAuth, then complete sign-in and approval on Ink.

## Claude

Add a custom connector with `https://ink.ego.ist/mcp` in Claude's connector settings and complete browser authorization. The directory connector is submitted for review and is not published yet. The Ink widget can show results and Compare when the assistant supports it.

## Claude Code

Install from the [Ink plugin repository ↗](https://github.com/Egoist-Machines/ink-claude-plugin):

```text
/plugin marketplace add Egoist-Machines/ink-claude-plugin
/plugin install ink@ink
```

The plugin connects to Ink over MCP with OAuth. Follow its browser authorization, then ask Claude to rewrite supplied text with Ink. See the repository README for portable skill, Gemini and Cursor setup, and REST fallback with a locally configured `INK_API_KEY`.

## Access and review

Text sent through an assistant is also visible to that assistant. Review output before using it. Connecting grants only the [Ink OAuth scope](https://ink.ego.ist/docs/mcp#authorize-a-client), with no Passport memory access. An assistant can connect before a plan is chosen; setup or quota errors link to Ink. Choose Disconnect in [Connections](https://ink.ego.ist/app/connections) to remove access.

Source: https://ink.ego.ist/docs/integrations


---

# REST API

## Authentication

Create a key in [API keys](https://ink.ego.ist/app/api-keys). A paid subscription is required; trials do not qualify. Unlimited accounts are exempt. Past-due subscriptions qualify only while the configured payment grace is enabled.

Send `Authorization: Bearer $INK_API_KEY` on every REST request. New keys use `ink_live_` in production and `ink_test_` elsewhere, independently of Stripe billing mode. Existing keys with either prefix remain valid until revoked. Browser requests that change state must pass Ink's Origin and Sec-Fetch-Site checks.

## Request fields

[Create a rewrite](https://ink.ego.ist/docs/api/reference/create-rewrite) with `text` and optional `settings`, `mode`, `profile`, `locks` and `unlocks`. Unknown fields at any level are rejected. Text must contain words, valid Unicode and no null characters.

* `settings.context`: `general` (default), `work`, `casual` or `academic`.
* `settings.formality`: `auto` (default), `more formal` or `less formal`.
* `settings.strength`: `balanced` (default), `light` or `strong`.
* `settings.target_words`: reserved for staff requests and ignored for other callers.
* `profile`: `shared` (default) or an owned, ready voice profile UUID. Direct mode requires `shared`.
* `locks` and `unlocks`: verbatim input strings, in rewrite mode only. Each array allows 100 strings, with 20,000 characters across both arrays and 2,000 expanded occurrences. Locks add fixed wording to fact checks. Unlocks release automatic highlights, including nested spans. Invalid edits return HTTP 400 with a field. Lock strings follow text retention.

Rewrite input allows 20,000 words; direct input allows 4,000 words. Both allow 200,000 characters. JSON bodies allow 1,204,096 bytes. Oversized requests return 413 `text_too_long`.

## Create and poll

POST requests require a UUID `Idempotency-Key`. Reuse it for the same request to avoid another job or charge. Changing text, mode, profile, effective settings, locks or unlocks with the same UUID returns 409 `idempotency_conflict`.

HTTP 200 returns the full finished result. HTTP 202 returns only `id` and `status`. Both include a `Location` header for `/api/v1/rewrites/{id}`. Poll [GET job](https://ink.ego.ist/docs/api/reference/get-rewrite) with the same Bearer key. A job that fails during POST returns an HTTP error and Location so you can retrieve its status. There is no collection GET.

Poll every two seconds while queued or starting the model, then every second while writing, rewriting or validating. Cold starts can take a few minutes. GET returns HTTP 200 even for failed jobs. Missing or unowned jobs return 404. Guest keys cannot access another key's jobs.

[DELETE job](https://ink.ego.ist/docs/api/reference/cancel-rewrite) requests cancellation and returns current state. It may remain pending until the worker stops.

## Response fields

`queued`, `rewriting` and `validating` are pending statuses. `completed`, `completed_with_warnings` and `needs_review` are terminal results. Review a `needs_review` result even when warnings is empty. `failed` means no usable result; `cancelled` means stopped.

`id` is the job UUID. `output` and `change_summary` appear when available. `warnings` contains `code`, `message`, `missing` and optional `missing_count`. Deliver output with its warnings; do not retry automatically on `details_added`, `first_person_added` or `sections_kept`.

On `details_added`, deliver the output with its warning listing added details. The message is "Check added details before use: ...". On `first_person_added`, deliver the output with its warning listing added first-person words. The message is "Added first-person wording: ..." or, when the list is absent, "Added first-person wording. Check the rewrite.".

`input_words` counts input. `charged_words` is the net ledger charge after refunds; `refunded_words` appears when words were refunded. `created_at` and `finished_at` are ISO timestamps; unfinished jobs have a null finish time. Failed jobs include `error` with `code` and `message`.

`blocks` is an ordered array of completed `index` and `text` previews. `progress` contains `phase`, `blocks_done` and `blocks_total`. Phase is `queued`, `starting_model`, `writing`, `rewriting`, `validating` or null when finished. Missing indices are pending. Partial blocks are not final output; warnings and summaries are final only.

Lock-aware retained results can include `fact_report` with `total`, `kept`, `groups` and `changed`. Groups have `type`, `total` and `kept`; changed facts have `text` and `type`. See [retention](https://ink.ego.ist/docs/policies#text-retention) for fields that disappear after text expiry.

## First-person wording

The first-person rule applies to the new rewrite policy. Personal narration anywhere in the whole source disables first-person prevention and checking. Code, contacts and active template placeholders are excluded. Straight or curly double quotes and Markdown blockquotes mark quotations; single quotes do not. Pronouns and contractions are matched case-insensitively, including lowercase i, apart from list and index syntax. A standalone I is a numeral only after a numbering word or name, such as World War, Phase, Part, Chapter, Type, Book, Class, Henry or Elizabeth, and before punctuation, a closing bracket, a line end or the end of text. A following word counts as personal, including World War I ended. and Phase I trials. Uppercase US is the country only when at least one of the three words on either side contains a lowercase letter; all-caps US counts as first person. U.S. is excluded.

Fully impersonal sources flag any first-person words in output, including quotations. When enabled, decode-time prevention applies only to these sources, with bans filtered to avoid matching source words or substrings in copyable literals. Sources whose only first person is quoted use per-section counts of each first-person word form, case-insensitive, with straight and curly apostrophes normalized and contractions grouped with their base pronoun. Only excess occurrences are flagged, regardless of output quotation style. Known limit: for sources whose only first person is quoted, a quoted pronoun moving into narration with the same count is not flagged.

First-person failures share the existing two-attempt section budget with other guards. Light and balanced deliver persistent additions with `first_person_added` and `completed_with_warnings`. The `missing` list 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.

## Meaning checks

Ink silently checks rewrite meaning with OpenAI when configured. Every changed candidate is checked, including retries. A meaning finding can use the section's single shared retry, with source-quote hints. Deterministic guards take precedence when choosing a candidate, then fewer material or critical findings win, with the retry winning a tie. Light and balanced deliver persistent meaning problems silently. Strong keeps and refunds a source section through `sections_kept` only when the chosen candidate still has a critical added claim, changed fact or speaker problem. Material findings are delivered silently; dropped findings can trigger a retry and affect selection but do not keep source by themselves. Unavailable checks fail open. Older saved policies keep their behavior.

## Write from a prompt

[POST writes](https://ink.ego.ist/docs/api/reference/create-write) accepts only `prompt`. Put all instructions in the prompt. Ink sends it exactly as one user message without a system prompt and retries rejected output once within the deadline.

Prompts allow 6,000 words and 200,000 characters, with up to 4,000 output words. Ink reserves available words up to that output cap. Admission requires at least the smaller of 300 and 4,000 available words, plus the API minimum of 100 words. It charges actual output words and refunds the remainder. Failed or cancelled jobs refund the full reservation. Unlimited and guest keys reserve the cap without the API minimum; guest gross budgets count reservations after refunds.

Poll, cancel and give feedback through the same rewrite job URLs. Prompt jobs have `mode: write` and progress phase `writing`. They have no source comparison, context, formality, strength or personal voice fields. Prompt and output follow the same retention and feedback policy. When writing is disabled, new requests return `tool_unavailable`.

## Direct mode

Set `mode` to `direct` on POST rewrites to send `text` exactly as one user message without a system prompt or rewrite processing. Ink trims only surrounding whitespace from the reply. Direct mode ignores all settings and requires the shared profile. It charges input words, uses the same job URLs and is available only with REST keys. Direct jobs are excluded from web history.

```sh
curl https://ink.ego.ist/api/v1/rewrites \
  -H "Authorization: Bearer $INK_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"mode":"direct","text":"What is the capital of France?"}'
```

## Feedback

[GET feedback](https://ink.ego.ist/docs/api/reference/get-feedback) reads feedback; [POST feedback](https://ink.ego.ist/docs/api/reference/save-feedback) saves or clears it. Only completed, completed_with_warnings or needs_review jobs accept feedback. Send `rating` as `up`, `down` or null to clear.

Only down accepts `reasons`: Changed my meaning, Still reads as AI, Wrong tone, Dropped facts or details, Other. Either rating accepts a note of up to 500 Unicode characters. Feedback bodies allow 8,192 bytes; oversized bodies return 422 `input_too_long`. Unknown fields, text fields and body `job_id` are rejected. The job ID belongs in the path.

Responses include `feedback`, `creditedWords` and `note_retention_days`. Reads also include `eligibleForCredit` and `creditRequiresPaidPlan`. Read [feedback sharing](https://ink.ego.ist/docs/policies#feedback-sharing) before sending a rating.

## Charges and rate limits

Rewrite and direct requests reserve the larger of input words and 100 words. Final `charged_words` can be lower. Cancellation refunds words not yet rewritten; failure refunds all reserved words. Unlimited accounts record actual input words without the minimum. Replaying the same idempotency key does not charge again.

All REST calls, including polling and feedback, share 60 requests per minute per key. New rewrite jobs also share 10 per minute per user across clients. Feedback writes share 30 per minute per user. A key's optional monthly word cap also applies.

Guest keys have a daily ceiling of 200,000 reserved words per key, resetting at 00:00 UTC. Gross reservations count even after refunds. Unlimited accounts have no daily word ceiling. Limit errors return 429; wait for the window to reset and use `Retry-After` when supplied.

## Errors

Errors use `{"error":{"code":"invalid_input","message":"...","field":"settings.strength"}}`. Field errors name the field without returning submitted text. Terms errors include `action_url`; quota errors include a purchase hint. See [terms_required](https://ink.ego.ist/docs/policies#current-terms) for the acceptance flow. Unsupported methods return 405 with `Allow`; HEAD has no response body.

| Code                       | HTTP status | Meaning                                                                                              |
| -------------------------- | ----------- | ---------------------------------------------------------------------------------------------------- |
| idempotency_key_required   | 400         | Send a UUID in the Idempotency-Key header.                                                           |
| invalid_json               | 400         | Send valid JSON in the request body.                                                                 |
| unauthorized               | 401         | A valid API key is required.                                                                         |
| paid_plan_required         | 402         | API keys require a paid subscription. Trials do not qualify.                                         |
| setup_required             | 402         | Choose an Ink plan to rewrite.                                                                       |
| quota_exceeded             | 402         | This rewrite exceeds your remaining word allowance.                                                  |
| payment_past_due           | 402         | Your last payment failed. Update your card in Billing.                                               |
| terms_required             | 403         | Accept Ink terms to continue.                                                                        |
| forbidden_origin           | 403         | This request must come from Ink.                                                                     |
| permission_required        | 403         | Passport permission is required to use this voice. Review access or delete the adapter.              |
| not_found                  | 404         | Rewrite not found.                                                                                   |
| method_not_allowed         | 405         | This method is not allowed for this endpoint.                                                        |
| idempotency_conflict       | 409         | This Idempotency-Key was already used with different text or settings.                               |
| text_too_long              | 413         | This text exceeds the request limit.                                                                 |
| unknown_field              | 422         | Remove the unknown field.                                                                            |
| invalid_input              | 422         | Enter text and choose valid rewrite settings.                                                        |
| input_too_long             | 422         | This text exceeds the request limit.                                                                 |
| training_in_progress       | 422         | This voice profile is still training.                                                                |
| insufficient_samples       | 422         | This voice profile needs approved samples and an active adapter.                                     |
| output_unreliable          | 422         | This draft did not rewrite reliably, so we stopped. Your words were not used. Try a shorter section. |
| key_cap_exceeded           | 429         | This rewrite exceeds this API key's monthly word cap.                                                |
| rate_limited               | 429         | Too many rewrite requests. Try again later.                                                          |
| daily_ceiling_exceeded     | 429         | The daily safety limit has been reached. Try again after 00:00 UTC.                                  |
| tool_unavailable           | 503         | Writing from a prompt is unavailable right now.                                                      |
| model_unavailable          | 503         | The model is starting or unavailable. Try again shortly.                                             |
| model_rejected             | 503         | The model could not process this rewrite.                                                            |
| pinned_adapter_unavailable | 503         | The model version pinned to this rewrite is unavailable. Start a new rewrite.                        |

Source: https://ink.ego.ist/docs/api


---

# Policies

## Current terms

Current terms: `ink-terms-2026-11-03b`. An older receipt does not grant acceptance of this version. New or edited feedback and all other REST and MCP calls, including result retrieval, require a current receipt.

REST returns HTTP 403 with `error.code` set to `terms_required` and an `action_url` for acceptance on Ink. MCP returns `isError: true` and `structuredContent.error` with the same code and an `action_url`. Show the person that URL, then retry after acceptance. Key creation and editing also require current terms; existing keys can still be revoked.

Clearing feedback with `POST {"rating":null}` does not require current terms. Authentication, plan and rate limits still apply. Ink terms acceptance is separate from Passport permissions. Signing in grants no Passport memory access.

## Text retention

Text is kept for 30 days, then deleted. This applies to API drafts, direct messages, prompts and output. Once text expires, job metadata remains, `output` is absent, `blocks` is empty and lock strings cannot be recovered. Lock-aware fact reports are available only while retained text and review provenance remain.

Outside the free try, drafts and rewrites are not used for training unless you send feedback. Personal voice training needs separate consent. Owners can export retained data and delete jobs or their account.

## Feedback sharing

Sending either rating shares the original and rewritten text and any note with Ink to improve and train Ink's models. Giving feedback is consent to this sharing. Text and notes are deleted after 90 days. Editing feedback does not restart text retention. Ratings and reasons stay with the job.

Clearing feedback, deleting the job or deleting the account removes the feedback text and note sooner. Models already trained before deletion are not retrained or reverted. See [REST feedback](https://ink.ego.ist/docs/api#feedback) for validation and clearing.

## Processing policy

Ink sends source sections and rewrite candidates to OpenAI for silent meaning checks when configured. A check may use the section's single retry. Strong keeps and refunds a section when a critical added claim, changed fact or speaker problem persists.

Ink never sends customer text to external AI detectors.

Read [Terms](https://ink.ego.ist/terms) and [Privacy](https://ink.ego.ist/privacy). Contact [support](mailto:support@ego.ist) for integration help or [privacy](mailto:privacy@ego.ist) for data requests.

Source: https://ink.ego.ist/docs/policies


---

# Create a rewrite

`POST /api/v1/rewrites`

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.

## Authentication

Bearer API key. A paid plan after trial and current terms are required, except when clearing feedback.

## Parameters

```json
[
  {
    "name": "Idempotency-Key",
    "in": "header",
    "required": true,
    "schema": {
      "type": "string",
      "format": "uuid"
    },
    "description": "Reuse a UUID for the same request. A changed request with the same UUID returns idempotency_conflict."
  }
]
```

## Request body

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "mode": {
      "default": "rewrite",
      "type": "string",
      "enum": [
        "rewrite",
        "direct"
      ]
    },
    "text": {
      "type": "string"
    },
    "settings": {
      "type": "object",
      "properties": {
        "context": {
          "default": "general",
          "type": "string",
          "enum": [
            "general",
            "work",
            "casual",
            "academic"
          ]
        },
        "formality": {
          "default": "auto",
          "type": "string",
          "enum": [
            "auto",
            "more formal",
            "less formal"
          ]
        },
        "strength": {
          "type": "string",
          "enum": [
            "light",
            "balanced",
            "strong"
          ]
        },
        "target_words": {
          "type": "integer",
          "minimum": 20,
          "maximum": 2000
        }
      },
      "additionalProperties": false
    },
    "locks": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "unlocks": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "profile": {
      "default": "shared",
      "anyOf": [
        {
          "type": "string",
          "const": "shared"
        },
        {
          "type": "string",
          "format": "uuid",
          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
        }
      ]
    }
  },
  "required": [
    "text"
  ],
  "additionalProperties": false
}
```

## Responses

### HTTP 200

Finished job. Review warnings and needs_review before using output.

```json
{
  "headers": {
    "Location": {
      "description": "Poll this job URL with the same Bearer key.",
      "schema": {
        "type": "string"
      }
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "required": [
          "id",
          "status",
          "blocks",
          "progress",
          "warnings",
          "input_words",
          "charged_words",
          "created_at",
          "finished_at"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "status": {
            "enum": [
              "queued",
              "rewriting",
              "validating",
              "completed",
              "completed_with_warnings",
              "needs_review",
              "failed",
              "cancelled"
            ]
          },
          "mode": {
            "enum": [
              "rewrite",
              "direct"
            ]
          },
          "output": {
            "type": "string"
          },
          "change_summary": {
            "type": "string"
          },
          "input_words": {
            "type": "integer",
            "minimum": 0
          },
          "charged_words": {
            "type": "integer",
            "minimum": 0
          },
          "refunded_words": {
            "type": "integer",
            "minimum": 0
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "finished_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "warnings": {
            "type": "array",
            "description": "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.",
            "items": {
              "type": "object",
              "properties": {
                "code": {
                  "type": "string"
                },
                "message": {
                  "type": "string"
                },
                "missing": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "missing_count": {
                  "type": "integer",
                  "minimum": 0
                }
              }
            }
          },
          "blocks": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "index": {
                  "type": "integer",
                  "minimum": 0
                },
                "text": {
                  "type": "string"
                }
              }
            }
          },
          "progress": {
            "type": "object",
            "properties": {
              "phase": {
                "enum": [
                  "queued",
                  "starting_model",
                  "writing",
                  "rewriting",
                  "validating",
                  null
                ]
              },
              "blocks_done": {
                "type": "integer",
                "minimum": 0
              },
              "blocks_total": {
                "type": "integer",
                "minimum": 0
              }
            }
          },
          "fact_report": {
            "type": "object",
            "properties": {
              "total": {
                "type": "integer",
                "minimum": 0
              },
              "kept": {
                "type": "integer",
                "minimum": 0
              },
              "groups": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string"
                    },
                    "total": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "kept": {
                      "type": "integer",
                      "minimum": 0
                    }
                  }
                }
              },
              "changed": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "text": {
                      "type": "string"
                    },
                    "type": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "error": {
            "type": "object",
            "properties": {
              "code": {
                "type": "string"
              },
              "message": {
                "type": "string"
              }
            }
          }
        }
      }
    }
  }
}
```

### HTTP 202

Pending job. Poll Location until terminal.

```json
{
  "headers": {
    "Location": {
      "description": "Poll this job URL with the same Bearer key.",
      "schema": {
        "type": "string"
      }
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "required": [
          "id",
          "status"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "status": {
            "enum": [
              "queued",
              "rewriting",
              "validating"
            ]
          }
        }
      }
    }
  }
}
```

### HTTP 400

Missing Idempotency-Key or invalid JSON. invalid_input also uses 400 for lock edits and target word budget errors.

```json
{
  "headers": {
    "Location": {
      "description": "Poll this job URL with the same Bearer key.",
      "schema": {
        "type": "string"
      }
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "object",
            "required": [
              "code",
              "message"
            ],
            "properties": {
              "code": {
                "type": "string",
                "enum": [
                  "idempotency_key_required",
                  "invalid_json",
                  "unauthorized",
                  "paid_plan_required",
                  "setup_required",
                  "quota_exceeded",
                  "payment_past_due",
                  "terms_required",
                  "forbidden_origin",
                  "permission_required",
                  "not_found",
                  "method_not_allowed",
                  "idempotency_conflict",
                  "text_too_long",
                  "unknown_field",
                  "invalid_input",
                  "input_too_long",
                  "training_in_progress",
                  "insufficient_samples",
                  "output_unreliable",
                  "key_cap_exceeded",
                  "rate_limited",
                  "daily_ceiling_exceeded",
                  "tool_unavailable",
                  "model_unavailable",
                  "model_rejected",
                  "pinned_adapter_unavailable"
                ]
              },
              "message": {
                "type": "string"
              },
              "field": {
                "type": "string"
              },
              "action_url": {
                "type": "string",
                "format": "uri"
              },
              "hint": {
                "type": "string"
              }
            }
          }
        }
      }
    }
  }
}
```

### HTTP 401

unauthorized: A valid API key is required.

```json
{
  "headers": {
    "Location": {
      "description": "Poll this job URL with the same Bearer key.",
      "schema": {
        "type": "string"
      }
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "object",
            "required": [
              "code",
              "message"
            ],
            "properties": {
              "code": {
                "type": "string",
                "enum": [
                  "idempotency_key_required",
                  "invalid_json",
                  "unauthorized",
                  "paid_plan_required",
                  "setup_required",
                  "quota_exceeded",
                  "payment_past_due",
                  "terms_required",
                  "forbidden_origin",
                  "permission_required",
                  "not_found",
                  "method_not_allowed",
                  "idempotency_conflict",
                  "text_too_long",
                  "unknown_field",
                  "invalid_input",
                  "input_too_long",
                  "training_in_progress",
                  "insufficient_samples",
                  "output_unreliable",
                  "key_cap_exceeded",
                  "rate_limited",
                  "daily_ceiling_exceeded",
                  "tool_unavailable",
                  "model_unavailable",
                  "model_rejected",
                  "pinned_adapter_unavailable"
                ]
              },
              "message": {
                "type": "string"
              },
              "field": {
                "type": "string"
              },
              "action_url": {
                "type": "string",
                "format": "uri"
              },
              "hint": {
                "type": "string"
              }
            }
          }
        }
      }
    }
  }
}
```

### HTTP 402

paid_plan_required: API keys require a paid subscription. Trials do not qualify.

setup_required: Choose an Ink plan to rewrite.

quota_exceeded: This rewrite exceeds your remaining word allowance.

payment_past_due: Your last payment failed. Update your card in Billing.

```json
{
  "headers": {
    "Location": {
      "description": "Poll this job URL with the same Bearer key.",
      "schema": {
        "type": "string"
      }
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "object",
            "required": [
              "code",
              "message"
            ],
            "properties": {
              "code": {
                "type": "string",
                "enum": [
                  "idempotency_key_required",
                  "invalid_json",
                  "unauthorized",
                  "paid_plan_required",
                  "setup_required",
                  "quota_exceeded",
                  "payment_past_due",
                  "terms_required",
                  "forbidden_origin",
                  "permission_required",
                  "not_found",
                  "method_not_allowed",
                  "idempotency_conflict",
                  "text_too_long",
                  "unknown_field",
                  "invalid_input",
                  "input_too_long",
                  "training_in_progress",
                  "insufficient_samples",
                  "output_unreliable",
                  "key_cap_exceeded",
                  "rate_limited",
                  "daily_ceiling_exceeded",
                  "tool_unavailable",
                  "model_unavailable",
                  "model_rejected",
                  "pinned_adapter_unavailable"
                ]
              },
              "message": {
                "type": "string"
              },
              "field": {
                "type": "string"
              },
              "action_url": {
                "type": "string",
                "format": "uri"
              },
              "hint": {
                "type": "string"
              }
            }
          }
        }
      }
    }
  }
}
```

### HTTP 403

terms_required: Accept Ink terms to continue.

forbidden_origin: This request must come from Ink.

permission_required: Passport permission is required to use this voice. Review access or delete the adapter.

```json
{
  "headers": {
    "Location": {
      "description": "Poll this job URL with the same Bearer key.",
      "schema": {
        "type": "string"
      }
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "object",
            "required": [
              "code",
              "message"
            ],
            "properties": {
              "code": {
                "type": "string",
                "enum": [
                  "idempotency_key_required",
                  "invalid_json",
                  "unauthorized",
                  "paid_plan_required",
                  "setup_required",
                  "quota_exceeded",
                  "payment_past_due",
                  "terms_required",
                  "forbidden_origin",
                  "permission_required",
                  "not_found",
                  "method_not_allowed",
                  "idempotency_conflict",
                  "text_too_long",
                  "unknown_field",
                  "invalid_input",
                  "input_too_long",
                  "training_in_progress",
                  "insufficient_samples",
                  "output_unreliable",
                  "key_cap_exceeded",
                  "rate_limited",
                  "daily_ceiling_exceeded",
                  "tool_unavailable",
                  "model_unavailable",
                  "model_rejected",
                  "pinned_adapter_unavailable"
                ]
              },
              "message": {
                "type": "string"
              },
              "field": {
                "type": "string"
              },
              "action_url": {
                "type": "string",
                "format": "uri"
              },
              "hint": {
                "type": "string"
              }
            }
          }
        }
      }
    }
  }
}
```

### HTTP 404

not_found: Rewrite not found.

```json
{
  "headers": {
    "Location": {
      "description": "Poll this job URL with the same Bearer key.",
      "schema": {
        "type": "string"
      }
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "object",
            "required": [
              "code",
              "message"
            ],
            "properties": {
              "code": {
                "type": "string",
                "enum": [
                  "idempotency_key_required",
                  "invalid_json",
                  "unauthorized",
                  "paid_plan_required",
                  "setup_required",
                  "quota_exceeded",
                  "payment_past_due",
                  "terms_required",
                  "forbidden_origin",
                  "permission_required",
                  "not_found",
                  "method_not_allowed",
                  "idempotency_conflict",
                  "text_too_long",
                  "unknown_field",
                  "invalid_input",
                  "input_too_long",
                  "training_in_progress",
                  "insufficient_samples",
                  "output_unreliable",
                  "key_cap_exceeded",
                  "rate_limited",
                  "daily_ceiling_exceeded",
                  "tool_unavailable",
                  "model_unavailable",
                  "model_rejected",
                  "pinned_adapter_unavailable"
                ]
              },
              "message": {
                "type": "string"
              },
              "field": {
                "type": "string"
              },
              "action_url": {
                "type": "string",
                "format": "uri"
              },
              "hint": {
                "type": "string"
              }
            }
          }
        }
      }
    }
  }
}
```

### HTTP 405

method_not_allowed: This method is not allowed for this endpoint.

```json
{
  "headers": {
    "Location": {
      "description": "Poll this job URL with the same Bearer key.",
      "schema": {
        "type": "string"
      }
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "object",
            "required": [
              "code",
              "message"
            ],
            "properties": {
              "code": {
                "type": "string",
                "enum": [
                  "idempotency_key_required",
                  "invalid_json",
                  "unauthorized",
                  "paid_plan_required",
                  "setup_required",
                  "quota_exceeded",
                  "payment_past_due",
                  "terms_required",
                  "forbidden_origin",
                  "permission_required",
                  "not_found",
                  "method_not_allowed",
                  "idempotency_conflict",
                  "text_too_long",
                  "unknown_field",
                  "invalid_input",
                  "input_too_long",
                  "training_in_progress",
                  "insufficient_samples",
                  "output_unreliable",
                  "key_cap_exceeded",
                  "rate_limited",
                  "daily_ceiling_exceeded",
                  "tool_unavailable",
                  "model_unavailable",
                  "model_rejected",
                  "pinned_adapter_unavailable"
                ]
              },
              "message": {
                "type": "string"
              },
              "field": {
                "type": "string"
              },
              "action_url": {
                "type": "string",
                "format": "uri"
              },
              "hint": {
                "type": "string"
              }
            }
          }
        }
      }
    }
  }
}
```

### HTTP 409

idempotency_conflict: This Idempotency-Key was already used with different text or settings.

```json
{
  "headers": {
    "Location": {
      "description": "Poll this job URL with the same Bearer key.",
      "schema": {
        "type": "string"
      }
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "object",
            "required": [
              "code",
              "message"
            ],
            "properties": {
              "code": {
                "type": "string",
                "enum": [
                  "idempotency_key_required",
                  "invalid_json",
                  "unauthorized",
                  "paid_plan_required",
                  "setup_required",
                  "quota_exceeded",
                  "payment_past_due",
                  "terms_required",
                  "forbidden_origin",
                  "permission_required",
                  "not_found",
                  "method_not_allowed",
                  "idempotency_conflict",
                  "text_too_long",
                  "unknown_field",
                  "invalid_input",
                  "input_too_long",
                  "training_in_progress",
                  "insufficient_samples",
                  "output_unreliable",
                  "key_cap_exceeded",
                  "rate_limited",
                  "daily_ceiling_exceeded",
                  "tool_unavailable",
                  "model_unavailable",
                  "model_rejected",
                  "pinned_adapter_unavailable"
                ]
              },
              "message": {
                "type": "string"
              },
              "field": {
                "type": "string"
              },
              "action_url": {
                "type": "string",
                "format": "uri"
              },
              "hint": {
                "type": "string"
              }
            }
          }
        }
      }
    }
  }
}
```

### HTTP 413

text_too_long: This text exceeds the request limit.

```json
{
  "headers": {
    "Location": {
      "description": "Poll this job URL with the same Bearer key.",
      "schema": {
        "type": "string"
      }
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "object",
            "required": [
              "code",
              "message"
            ],
            "properties": {
              "code": {
                "type": "string",
                "enum": [
                  "idempotency_key_required",
                  "invalid_json",
                  "unauthorized",
                  "paid_plan_required",
                  "setup_required",
                  "quota_exceeded",
                  "payment_past_due",
                  "terms_required",
                  "forbidden_origin",
                  "permission_required",
                  "not_found",
                  "method_not_allowed",
                  "idempotency_conflict",
                  "text_too_long",
                  "unknown_field",
                  "invalid_input",
                  "input_too_long",
                  "training_in_progress",
                  "insufficient_samples",
                  "output_unreliable",
                  "key_cap_exceeded",
                  "rate_limited",
                  "daily_ceiling_exceeded",
                  "tool_unavailable",
                  "model_unavailable",
                  "model_rejected",
                  "pinned_adapter_unavailable"
                ]
              },
              "message": {
                "type": "string"
              },
              "field": {
                "type": "string"
              },
              "action_url": {
                "type": "string",
                "format": "uri"
              },
              "hint": {
                "type": "string"
              }
            }
          }
        }
      }
    }
  }
}
```

### HTTP 422

unknown_field: Remove the unknown field.

invalid_input: Enter text and choose valid rewrite settings.

input_too_long: This text exceeds the request limit.

training_in_progress: This voice profile is still training.

insufficient_samples: This voice profile needs approved samples and an active adapter.

output_unreliable: This draft did not rewrite reliably, so we stopped. Your words were not used. Try a shorter section.

```json
{
  "headers": {
    "Location": {
      "description": "Poll this job URL with the same Bearer key.",
      "schema": {
        "type": "string"
      }
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "object",
            "required": [
              "code",
              "message"
            ],
            "properties": {
              "code": {
                "type": "string",
                "enum": [
                  "idempotency_key_required",
                  "invalid_json",
                  "unauthorized",
                  "paid_plan_required",
                  "setup_required",
                  "quota_exceeded",
                  "payment_past_due",
                  "terms_required",
                  "forbidden_origin",
                  "permission_required",
                  "not_found",
                  "method_not_allowed",
                  "idempotency_conflict",
                  "text_too_long",
                  "unknown_field",
                  "invalid_input",
                  "input_too_long",
                  "training_in_progress",
                  "insufficient_samples",
                  "output_unreliable",
                  "key_cap_exceeded",
                  "rate_limited",
                  "daily_ceiling_exceeded",
                  "tool_unavailable",
                  "model_unavailable",
                  "model_rejected",
                  "pinned_adapter_unavailable"
                ]
              },
              "message": {
                "type": "string"
              },
              "field": {
                "type": "string"
              },
              "action_url": {
                "type": "string",
                "format": "uri"
              },
              "hint": {
                "type": "string"
              }
            }
          }
        }
      }
    }
  }
}
```

### HTTP 429

key_cap_exceeded: This rewrite exceeds this API key's monthly word cap.

rate_limited: Too many rewrite requests. Try again later.

daily_ceiling_exceeded: The daily safety limit has been reached. Try again after 00:00 UTC.

```json
{
  "headers": {
    "Retry-After": {
      "description": "Seconds until retry, when supplied.",
      "schema": {
        "type": "string"
      }
    },
    "Location": {
      "description": "Poll this job URL with the same Bearer key.",
      "schema": {
        "type": "string"
      }
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "object",
            "required": [
              "code",
              "message"
            ],
            "properties": {
              "code": {
                "type": "string",
                "enum": [
                  "idempotency_key_required",
                  "invalid_json",
                  "unauthorized",
                  "paid_plan_required",
                  "setup_required",
                  "quota_exceeded",
                  "payment_past_due",
                  "terms_required",
                  "forbidden_origin",
                  "permission_required",
                  "not_found",
                  "method_not_allowed",
                  "idempotency_conflict",
                  "text_too_long",
                  "unknown_field",
                  "invalid_input",
                  "input_too_long",
                  "training_in_progress",
                  "insufficient_samples",
                  "output_unreliable",
                  "key_cap_exceeded",
                  "rate_limited",
                  "daily_ceiling_exceeded",
                  "tool_unavailable",
                  "model_unavailable",
                  "model_rejected",
                  "pinned_adapter_unavailable"
                ]
              },
              "message": {
                "type": "string"
              },
              "field": {
                "type": "string"
              },
              "action_url": {
                "type": "string",
                "format": "uri"
              },
              "hint": {
                "type": "string"
              }
            }
          }
        }
      }
    }
  }
}
```

### HTTP 503

tool_unavailable: Writing from a prompt is unavailable right now.

model_unavailable: The model is starting or unavailable. Try again shortly.

model_rejected: The model could not process this rewrite.

pinned_adapter_unavailable: The model version pinned to this rewrite is unavailable. Start a new rewrite.

```json
{
  "headers": {
    "Location": {
      "description": "Poll this job URL with the same Bearer key.",
      "schema": {
        "type": "string"
      }
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "object",
            "required": [
              "code",
              "message"
            ],
            "properties": {
              "code": {
                "type": "string",
                "enum": [
                  "idempotency_key_required",
                  "invalid_json",
                  "unauthorized",
                  "paid_plan_required",
                  "setup_required",
                  "quota_exceeded",
                  "payment_past_due",
                  "terms_required",
                  "forbidden_origin",
                  "permission_required",
                  "not_found",
                  "method_not_allowed",
                  "idempotency_conflict",
                  "text_too_long",
                  "unknown_field",
                  "invalid_input",
                  "input_too_long",
                  "training_in_progress",
                  "insufficient_samples",
                  "output_unreliable",
                  "key_cap_exceeded",
                  "rate_limited",
                  "daily_ceiling_exceeded",
                  "tool_unavailable",
                  "model_unavailable",
                  "model_rejected",
                  "pinned_adapter_unavailable"
                ]
              },
              "message": {
                "type": "string"
              },
              "field": {
                "type": "string"
              },
              "action_url": {
                "type": "string",
                "format": "uri"
              },
              "hint": {
                "type": "string"
              }
            }
          }
        }
      }
    }
  }
}
```

Source: https://ink.ego.ist/docs/api/reference/create-rewrite


---

# Get a job

`GET /api/v1/rewrites/{id}`

## Authentication

Bearer API key. A paid plan after trial and current terms are required, except when clearing feedback.

## Parameters

```json
[
  {
    "name": "id",
    "in": "path",
    "required": true,
    "schema": {
      "type": "string",
      "format": "uuid"
    }
  }
]
```

## Responses

### HTTP 200

Current owned job, including failed jobs. After text expiry, output is absent and blocks is empty.

```json
{
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "required": [
          "id",
          "status",
          "blocks",
          "progress",
          "warnings",
          "input_words",
          "charged_words",
          "created_at",
          "finished_at"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "status": {
            "enum": [
              "queued",
              "rewriting",
              "validating",
              "completed",
              "completed_with_warnings",
              "needs_review",
              "failed",
              "cancelled"
            ]
          },
          "mode": {
            "enum": [
              "rewrite",
              "direct",
              "write"
            ]
          },
          "output": {
            "type": "string"
          },
          "change_summary": {
            "type": "string"
          },
          "input_words": {
            "type": "integer",
            "minimum": 0
          },
          "charged_words": {
            "type": "integer",
            "minimum": 0
          },
          "refunded_words": {
            "type": "integer",
            "minimum": 0
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "finished_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "warnings": {
            "type": "array",
            "description": "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.",
            "items": {
              "type": "object",
              "properties": {
                "code": {
                  "type": "string"
                },
                "message": {
                  "type": "string"
                },
                "missing": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "missing_count": {
                  "type": "integer",
                  "minimum": 0
                }
              }
            }
          },
          "blocks": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "index": {
                  "type": "integer",
                  "minimum": 0
                },
                "text": {
                  "type": "string"
                }
              }
            }
          },
          "progress": {
            "type": "object",
            "properties": {
              "phase": {
                "enum": [
                  "queued",
                  "starting_model",
                  "writing",
                  "rewriting",
                  "validating",
                  null
                ]
              },
              "blocks_done": {
                "type": "integer",
                "minimum": 0
              },
              "blocks_total": {
                "type": "integer",
                "minimum": 0
              }
            }
          },
          "fact_report": {
            "type": "object",
            "properties": {
              "total": {
                "type": "integer",
                "minimum": 0
              },
              "kept": {
                "type": "integer",
                "minimum": 0
              },
              "groups": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string"
                    },
                    "total": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "kept": {
                      "type": "integer",
                      "minimum": 0
                    }
                  }
                }
              },
              "changed": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "text": {
                      "type": "string"
                    },
                    "type": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "error": {
            "type": "object",
            "properties": {
              "code": {
                "type": "string"
              },
              "message": {
                "type": "string"
              }
            }
          }
        }
      }
    }
  }
}
```

### HTTP 400

Missing Idempotency-Key or invalid JSON. invalid_input also uses 400 for lock edits and target word budget errors.

```json
{
  "headers": {
    "Location": {
      "description": "Poll this job URL with the same Bearer key.",
      "schema": {
        "type": "string"
      }
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "object",
            "required": [
              "code",
              "message"
            ],
            "properties": {
              "code": {
                "type": "string",
                "enum": [
                  "idempotency_key_required",
                  "invalid_json",
                  "unauthorized",
                  "paid_plan_required",
                  "setup_required",
                  "quota_exceeded",
                  "payment_past_due",
                  "terms_required",
                  "forbidden_origin",
                  "permission_required",
                  "not_found",
                  "method_not_allowed",
                  "idempotency_conflict",
                  "text_too_long",
                  "unknown_field",
                  "invalid_input",
                  "input_too_long",
                  "training_in_progress",
                  "insufficient_samples",
                  "output_unreliable",
                  "key_cap_exceeded",
                  "rate_limited",
                  "daily_ceiling_exceeded",
                  "tool_unavailable",
                  "model_unavailable",
                  "model_rejected",
                  "pinned_adapter_unavailable"
                ]
              },
              "message": {
                "type": "string"
              },
              "field": {
                "type": "string"
              },
              "action_url": {
                "type": "string",
                "format": "uri"
              },
              "hint": {
                "type": "string"
              }
            }
          }
        }
      }
    }
  }
}
```

### HTTP 401

unauthorized: A valid API key is required.

```json
{
  "headers": {
    "Location": {
      "description": "Poll this job URL with the same Bearer key.",
      "schema": {
        "type": "string"
      }
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "object",
            "required": [
              "code",
              "message"
            ],
            "properties": {
              "code": {
                "type": "string",
                "enum": [
                  "idempotency_key_required",
                  "invalid_json",
                  "unauthorized",
                  "paid_plan_required",
                  "setup_required",
                  "quota_exceeded",
                  "payment_past_due",
                  "terms_required",
                  "forbidden_origin",
                  "permission_required",
                  "not_found",
                  "method_not_allowed",
                  "idempotency_conflict",
                  "text_too_long",
                  "unknown_field",
                  "invalid_input",
                  "input_too_long",
                  "training_in_progress",
                  "insufficient_samples",
                  "output_unreliable",
                  "key_cap_exceeded",
                  "rate_limited",
                  "daily_ceiling_exceeded",
                  "tool_unavailable",
                  "model_unavailable",
                  "model_rejected",
                  "pinned_adapter_unavailable"
                ]
              },
              "message": {
                "type": "string"
              },
              "field": {
                "type": "string"
              },
              "action_url": {
                "type": "string",
                "format": "uri"
              },
              "hint": {
                "type": "string"
              }
            }
          }
        }
      }
    }
  }
}
```

### HTTP 402

paid_plan_required: API keys require a paid subscription. Trials do not qualify.

setup_required: Choose an Ink plan to rewrite.

quota_exceeded: This rewrite exceeds your remaining word allowance.

payment_past_due: Your last payment failed. Update your card in Billing.

```json
{
  "headers": {
    "Location": {
      "description": "Poll this job URL with the same Bearer key.",
      "schema": {
        "type": "string"
      }
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "object",
            "required": [
              "code",
              "message"
            ],
            "properties": {
              "code": {
                "type": "string",
                "enum": [
                  "idempotency_key_required",
                  "invalid_json",
                  "unauthorized",
                  "paid_plan_required",
                  "setup_required",
                  "quota_exceeded",
                  "payment_past_due",
                  "terms_required",
                  "forbidden_origin",
                  "permission_required",
                  "not_found",
                  "method_not_allowed",
                  "idempotency_conflict",
                  "text_too_long",
                  "unknown_field",
                  "invalid_input",
                  "input_too_long",
                  "training_in_progress",
                  "insufficient_samples",
                  "output_unreliable",
                  "key_cap_exceeded",
                  "rate_limited",
                  "daily_ceiling_exceeded",
                  "tool_unavailable",
                  "model_unavailable",
                  "model_rejected",
                  "pinned_adapter_unavailable"
                ]
              },
              "message": {
                "type": "string"
              },
              "field": {
                "type": "string"
              },
              "action_url": {
                "type": "string",
                "format": "uri"
              },
              "hint": {
                "type": "string"
              }
            }
          }
        }
      }
    }
  }
}
```

### HTTP 403

terms_required: Accept Ink terms to continue.

forbidden_origin: This request must come from Ink.

permission_required: Passport permission is required to use this voice. Review access or delete the adapter.

```json
{
  "headers": {
    "Location": {
      "description": "Poll this job URL with the same Bearer key.",
      "schema": {
        "type": "string"
      }
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "object",
            "required": [
              "code",
              "message"
            ],
            "properties": {
              "code": {
                "type": "string",
                "enum": [
                  "idempotency_key_required",
                  "invalid_json",
                  "unauthorized",
                  "paid_plan_required",
                  "setup_required",
                  "quota_exceeded",
                  "payment_past_due",
                  "terms_required",
                  "forbidden_origin",
                  "permission_required",
                  "not_found",
                  "method_not_allowed",
                  "idempotency_conflict",
                  "text_too_long",
                  "unknown_field",
                  "invalid_input",
                  "input_too_long",
                  "training_in_progress",
                  "insufficient_samples",
                  "output_unreliable",
                  "key_cap_exceeded",
                  "rate_limited",
                  "daily_ceiling_exceeded",
                  "tool_unavailable",
                  "model_unavailable",
                  "model_rejected",
                  "pinned_adapter_unavailable"
                ]
              },
              "message": {
                "type": "string"
              },
              "field": {
                "type": "string"
              },
              "action_url": {
                "type": "string",
                "format": "uri"
              },
              "hint": {
                "type": "string"
              }
            }
          }
        }
      }
    }
  }
}
```

### HTTP 404

not_found: Rewrite not found.

```json
{
  "headers": {
    "Location": {
      "description": "Poll this job URL with the same Bearer key.",
      "schema": {
        "type": "string"
      }
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "object",
            "required": [
              "code",
              "message"
            ],
            "properties": {
              "code": {
                "type": "string",
                "enum": [
                  "idempotency_key_required",
                  "invalid_json",
                  "unauthorized",
                  "paid_plan_required",
                  "setup_required",
                  "quota_exceeded",
                  "payment_past_due",
                  "terms_required",
                  "forbidden_origin",
                  "permission_required",
                  "not_found",
                  "method_not_allowed",
                  "idempotency_conflict",
                  "text_too_long",
                  "unknown_field",
                  "invalid_input",
                  "input_too_long",
                  "training_in_progress",
                  "insufficient_samples",
                  "output_unreliable",
                  "key_cap_exceeded",
                  "rate_limited",
                  "daily_ceiling_exceeded",
                  "tool_unavailable",
                  "model_unavailable",
                  "model_rejected",
                  "pinned_adapter_unavailable"
                ]
              },
              "message": {
                "type": "string"
              },
              "field": {
                "type": "string"
              },
              "action_url": {
                "type": "string",
                "format": "uri"
              },
              "hint": {
                "type": "string"
              }
            }
          }
        }
      }
    }
  }
}
```

### HTTP 405

method_not_allowed: This method is not allowed for this endpoint.

```json
{
  "headers": {
    "Location": {
      "description": "Poll this job URL with the same Bearer key.",
      "schema": {
        "type": "string"
      }
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "object",
            "required": [
              "code",
              "message"
            ],
            "properties": {
              "code": {
                "type": "string",
                "enum": [
                  "idempotency_key_required",
                  "invalid_json",
                  "unauthorized",
                  "paid_plan_required",
                  "setup_required",
                  "quota_exceeded",
                  "payment_past_due",
                  "terms_required",
                  "forbidden_origin",
                  "permission_required",
                  "not_found",
                  "method_not_allowed",
                  "idempotency_conflict",
                  "text_too_long",
                  "unknown_field",
                  "invalid_input",
                  "input_too_long",
                  "training_in_progress",
                  "insufficient_samples",
                  "output_unreliable",
                  "key_cap_exceeded",
                  "rate_limited",
                  "daily_ceiling_exceeded",
                  "tool_unavailable",
                  "model_unavailable",
                  "model_rejected",
                  "pinned_adapter_unavailable"
                ]
              },
              "message": {
                "type": "string"
              },
              "field": {
                "type": "string"
              },
              "action_url": {
                "type": "string",
                "format": "uri"
              },
              "hint": {
                "type": "string"
              }
            }
          }
        }
      }
    }
  }
}
```

### HTTP 409

idempotency_conflict: This Idempotency-Key was already used with different text or settings.

```json
{
  "headers": {
    "Location": {
      "description": "Poll this job URL with the same Bearer key.",
      "schema": {
        "type": "string"
      }
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "object",
            "required": [
              "code",
              "message"
            ],
            "properties": {
              "code": {
                "type": "string",
                "enum": [
                  "idempotency_key_required",
                  "invalid_json",
                  "unauthorized",
                  "paid_plan_required",
                  "setup_required",
                  "quota_exceeded",
                  "payment_past_due",
                  "terms_required",
                  "forbidden_origin",
                  "permission_required",
                  "not_found",
                  "method_not_allowed",
                  "idempotency_conflict",
                  "text_too_long",
                  "unknown_field",
                  "invalid_input",
                  "input_too_long",
                  "training_in_progress",
                  "insufficient_samples",
                  "output_unreliable",
                  "key_cap_exceeded",
                  "rate_limited",
                  "daily_ceiling_exceeded",
                  "tool_unavailable",
                  "model_unavailable",
                  "model_rejected",
                  "pinned_adapter_unavailable"
                ]
              },
              "message": {
                "type": "string"
              },
              "field": {
                "type": "string"
              },
              "action_url": {
                "type": "string",
                "format": "uri"
              },
              "hint": {
                "type": "string"
              }
            }
          }
        }
      }
    }
  }
}
```

### HTTP 413

text_too_long: This text exceeds the request limit.

```json
{
  "headers": {
    "Location": {
      "description": "Poll this job URL with the same Bearer key.",
      "schema": {
        "type": "string"
      }
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "object",
            "required": [
              "code",
              "message"
            ],
            "properties": {
              "code": {
                "type": "string",
                "enum": [
                  "idempotency_key_required",
                  "invalid_json",
                  "unauthorized",
                  "paid_plan_required",
                  "setup_required",
                  "quota_exceeded",
                  "payment_past_due",
                  "terms_required",
                  "forbidden_origin",
                  "permission_required",
                  "not_found",
                  "method_not_allowed",
                  "idempotency_conflict",
                  "text_too_long",
                  "unknown_field",
                  "invalid_input",
                  "input_too_long",
                  "training_in_progress",
                  "insufficient_samples",
                  "output_unreliable",
                  "key_cap_exceeded",
                  "rate_limited",
                  "daily_ceiling_exceeded",
                  "tool_unavailable",
                  "model_unavailable",
                  "model_rejected",
                  "pinned_adapter_unavailable"
                ]
              },
              "message": {
                "type": "string"
              },
              "field": {
                "type": "string"
              },
              "action_url": {
                "type": "string",
                "format": "uri"
              },
              "hint": {
                "type": "string"
              }
            }
          }
        }
      }
    }
  }
}
```

### HTTP 422

unknown_field: Remove the unknown field.

invalid_input: Enter text and choose valid rewrite settings.

input_too_long: This text exceeds the request limit.

training_in_progress: This voice profile is still training.

insufficient_samples: This voice profile needs approved samples and an active adapter.

output_unreliable: This draft did not rewrite reliably, so we stopped. Your words were not used. Try a shorter section.

```json
{
  "headers": {
    "Location": {
      "description": "Poll this job URL with the same Bearer key.",
      "schema": {
        "type": "string"
      }
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "object",
            "required": [
              "code",
              "message"
            ],
            "properties": {
              "code": {
                "type": "string",
                "enum": [
                  "idempotency_key_required",
                  "invalid_json",
                  "unauthorized",
                  "paid_plan_required",
                  "setup_required",
                  "quota_exceeded",
                  "payment_past_due",
                  "terms_required",
                  "forbidden_origin",
                  "permission_required",
                  "not_found",
                  "method_not_allowed",
                  "idempotency_conflict",
                  "text_too_long",
                  "unknown_field",
                  "invalid_input",
                  "input_too_long",
                  "training_in_progress",
                  "insufficient_samples",
                  "output_unreliable",
                  "key_cap_exceeded",
                  "rate_limited",
                  "daily_ceiling_exceeded",
                  "tool_unavailable",
                  "model_unavailable",
                  "model_rejected",
                  "pinned_adapter_unavailable"
                ]
              },
              "message": {
                "type": "string"
              },
              "field": {
                "type": "string"
              },
              "action_url": {
                "type": "string",
                "format": "uri"
              },
              "hint": {
                "type": "string"
              }
            }
          }
        }
      }
    }
  }
}
```

### HTTP 429

key_cap_exceeded: This rewrite exceeds this API key's monthly word cap.

rate_limited: Too many rewrite requests. Try again later.

daily_ceiling_exceeded: The daily safety limit has been reached. Try again after 00:00 UTC.

```json
{
  "headers": {
    "Retry-After": {
      "description": "Seconds until retry, when supplied.",
      "schema": {
        "type": "string"
      }
    },
    "Location": {
      "description": "Poll this job URL with the same Bearer key.",
      "schema": {
        "type": "string"
      }
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "object",
            "required": [
              "code",
              "message"
            ],
            "properties": {
              "code": {
                "type": "string",
                "enum": [
                  "idempotency_key_required",
                  "invalid_json",
                  "unauthorized",
                  "paid_plan_required",
                  "setup_required",
                  "quota_exceeded",
                  "payment_past_due",
                  "terms_required",
                  "forbidden_origin",
                  "permission_required",
                  "not_found",
                  "method_not_allowed",
                  "idempotency_conflict",
                  "text_too_long",
                  "unknown_field",
                  "invalid_input",
                  "input_too_long",
                  "training_in_progress",
                  "insufficient_samples",
                  "output_unreliable",
                  "key_cap_exceeded",
                  "rate_limited",
                  "daily_ceiling_exceeded",
                  "tool_unavailable",
                  "model_unavailable",
                  "model_rejected",
                  "pinned_adapter_unavailable"
                ]
              },
              "message": {
                "type": "string"
              },
              "field": {
                "type": "string"
              },
              "action_url": {
                "type": "string",
                "format": "uri"
              },
              "hint": {
                "type": "string"
              }
            }
          }
        }
      }
    }
  }
}
```

### HTTP 503

tool_unavailable: Writing from a prompt is unavailable right now.

model_unavailable: The model is starting or unavailable. Try again shortly.

model_rejected: The model could not process this rewrite.

pinned_adapter_unavailable: The model version pinned to this rewrite is unavailable. Start a new rewrite.

```json
{
  "headers": {
    "Location": {
      "description": "Poll this job URL with the same Bearer key.",
      "schema": {
        "type": "string"
      }
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "object",
            "required": [
              "code",
              "message"
            ],
            "properties": {
              "code": {
                "type": "string",
                "enum": [
                  "idempotency_key_required",
                  "invalid_json",
                  "unauthorized",
                  "paid_plan_required",
                  "setup_required",
                  "quota_exceeded",
                  "payment_past_due",
                  "terms_required",
                  "forbidden_origin",
                  "permission_required",
                  "not_found",
                  "method_not_allowed",
                  "idempotency_conflict",
                  "text_too_long",
                  "unknown_field",
                  "invalid_input",
                  "input_too_long",
                  "training_in_progress",
                  "insufficient_samples",
                  "output_unreliable",
                  "key_cap_exceeded",
                  "rate_limited",
                  "daily_ceiling_exceeded",
                  "tool_unavailable",
                  "model_unavailable",
                  "model_rejected",
                  "pinned_adapter_unavailable"
                ]
              },
              "message": {
                "type": "string"
              },
              "field": {
                "type": "string"
              },
              "action_url": {
                "type": "string",
                "format": "uri"
              },
              "hint": {
                "type": "string"
              }
            }
          }
        }
      }
    }
  }
}
```

Source: https://ink.ego.ist/docs/api/reference/get-rewrite


---

# Cancel a job

`DELETE /api/v1/rewrites/{id}`

## Authentication

Bearer API key. A paid plan after trial and current terms are required, except when clearing feedback.

## Parameters

```json
[
  {
    "name": "id",
    "in": "path",
    "required": true,
    "schema": {
      "type": "string",
      "format": "uuid"
    }
  }
]
```

## Responses

### HTTP 200

Current state. Cancellation can remain pending until the worker stops. Unused words are refunded.

```json
{
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "required": [
          "id",
          "status",
          "blocks",
          "progress",
          "warnings",
          "input_words",
          "charged_words",
          "created_at",
          "finished_at"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "status": {
            "enum": [
              "queued",
              "rewriting",
              "validating",
              "completed",
              "completed_with_warnings",
              "needs_review",
              "failed",
              "cancelled"
            ]
          },
          "mode": {
            "enum": [
              "rewrite",
              "direct",
              "write"
            ]
          },
          "output": {
            "type": "string"
          },
          "change_summary": {
            "type": "string"
          },
          "input_words": {
            "type": "integer",
            "minimum": 0
          },
          "charged_words": {
            "type": "integer",
            "minimum": 0
          },
          "refunded_words": {
            "type": "integer",
            "minimum": 0
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "finished_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "warnings": {
            "type": "array",
            "description": "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.",
            "items": {
              "type": "object",
              "properties": {
                "code": {
                  "type": "string"
                },
                "message": {
                  "type": "string"
                },
                "missing": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "missing_count": {
                  "type": "integer",
                  "minimum": 0
                }
              }
            }
          },
          "blocks": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "index": {
                  "type": "integer",
                  "minimum": 0
                },
                "text": {
                  "type": "string"
                }
              }
            }
          },
          "progress": {
            "type": "object",
            "properties": {
              "phase": {
                "enum": [
                  "queued",
                  "starting_model",
                  "writing",
                  "rewriting",
                  "validating",
                  null
                ]
              },
              "blocks_done": {
                "type": "integer",
                "minimum": 0
              },
              "blocks_total": {
                "type": "integer",
                "minimum": 0
              }
            }
          },
          "fact_report": {
            "type": "object",
            "properties": {
              "total": {
                "type": "integer",
                "minimum": 0
              },
              "kept": {
                "type": "integer",
                "minimum": 0
              },
              "groups": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string"
                    },
                    "total": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "kept": {
                      "type": "integer",
                      "minimum": 0
                    }
                  }
                }
              },
              "changed": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "text": {
                      "type": "string"
                    },
                    "type": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "error": {
            "type": "object",
            "properties": {
              "code": {
                "type": "string"
              },
              "message": {
                "type": "string"
              }
            }
          }
        }
      }
    }
  }
}
```

### HTTP 400

Missing Idempotency-Key or invalid JSON. invalid_input also uses 400 for lock edits and target word budget errors.

```json
{
  "headers": {
    "Location": {
      "description": "Poll this job URL with the same Bearer key.",
      "schema": {
        "type": "string"
      }
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "object",
            "required": [
              "code",
              "message"
            ],
            "properties": {
              "code": {
                "type": "string",
                "enum": [
                  "idempotency_key_required",
                  "invalid_json",
                  "unauthorized",
                  "paid_plan_required",
                  "setup_required",
                  "quota_exceeded",
                  "payment_past_due",
                  "terms_required",
                  "forbidden_origin",
                  "permission_required",
                  "not_found",
                  "method_not_allowed",
                  "idempotency_conflict",
                  "text_too_long",
                  "unknown_field",
                  "invalid_input",
                  "input_too_long",
                  "training_in_progress",
                  "insufficient_samples",
                  "output_unreliable",
                  "key_cap_exceeded",
                  "rate_limited",
                  "daily_ceiling_exceeded",
                  "tool_unavailable",
                  "model_unavailable",
                  "model_rejected",
                  "pinned_adapter_unavailable"
                ]
              },
              "message": {
                "type": "string"
              },
              "field": {
                "type": "string"
              },
              "action_url": {
                "type": "string",
                "format": "uri"
              },
              "hint": {
                "type": "string"
              }
            }
          }
        }
      }
    }
  }
}
```

### HTTP 401

unauthorized: A valid API key is required.

```json
{
  "headers": {
    "Location": {
      "description": "Poll this job URL with the same Bearer key.",
      "schema": {
        "type": "string"
      }
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "object",
            "required": [
              "code",
              "message"
            ],
            "properties": {
              "code": {
                "type": "string",
                "enum": [
                  "idempotency_key_required",
                  "invalid_json",
                  "unauthorized",
                  "paid_plan_required",
                  "setup_required",
                  "quota_exceeded",
                  "payment_past_due",
                  "terms_required",
                  "forbidden_origin",
                  "permission_required",
                  "not_found",
                  "method_not_allowed",
                  "idempotency_conflict",
                  "text_too_long",
                  "unknown_field",
                  "invalid_input",
                  "input_too_long",
                  "training_in_progress",
                  "insufficient_samples",
                  "output_unreliable",
                  "key_cap_exceeded",
                  "rate_limited",
                  "daily_ceiling_exceeded",
                  "tool_unavailable",
                  "model_unavailable",
                  "model_rejected",
                  "pinned_adapter_unavailable"
                ]
              },
              "message": {
                "type": "string"
              },
              "field": {
                "type": "string"
              },
              "action_url": {
                "type": "string",
                "format": "uri"
              },
              "hint": {
                "type": "string"
              }
            }
          }
        }
      }
    }
  }
}
```

### HTTP 402

paid_plan_required: API keys require a paid subscription. Trials do not qualify.

setup_required: Choose an Ink plan to rewrite.

quota_exceeded: This rewrite exceeds your remaining word allowance.

payment_past_due: Your last payment failed. Update your card in Billing.

```json
{
  "headers": {
    "Location": {
      "description": "Poll this job URL with the same Bearer key.",
      "schema": {
        "type": "string"
      }
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "object",
            "required": [
              "code",
              "message"
            ],
            "properties": {
              "code": {
                "type": "string",
                "enum": [
                  "idempotency_key_required",
                  "invalid_json",
                  "unauthorized",
                  "paid_plan_required",
                  "setup_required",
                  "quota_exceeded",
                  "payment_past_due",
                  "terms_required",
                  "forbidden_origin",
                  "permission_required",
                  "not_found",
                  "method_not_allowed",
                  "idempotency_conflict",
                  "text_too_long",
                  "unknown_field",
                  "invalid_input",
                  "input_too_long",
                  "training_in_progress",
                  "insufficient_samples",
                  "output_unreliable",
                  "key_cap_exceeded",
                  "rate_limited",
                  "daily_ceiling_exceeded",
                  "tool_unavailable",
                  "model_unavailable",
                  "model_rejected",
                  "pinned_adapter_unavailable"
                ]
              },
              "message": {
                "type": "string"
              },
              "field": {
                "type": "string"
              },
              "action_url": {
                "type": "string",
                "format": "uri"
              },
              "hint": {
                "type": "string"
              }
            }
          }
        }
      }
    }
  }
}
```

### HTTP 403

terms_required: Accept Ink terms to continue.

forbidden_origin: This request must come from Ink.

permission_required: Passport permission is required to use this voice. Review access or delete the adapter.

```json
{
  "headers": {
    "Location": {
      "description": "Poll this job URL with the same Bearer key.",
      "schema": {
        "type": "string"
      }
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "object",
            "required": [
              "code",
              "message"
            ],
            "properties": {
              "code": {
                "type": "string",
                "enum": [
                  "idempotency_key_required",
                  "invalid_json",
                  "unauthorized",
                  "paid_plan_required",
                  "setup_required",
                  "quota_exceeded",
                  "payment_past_due",
                  "terms_required",
                  "forbidden_origin",
                  "permission_required",
                  "not_found",
                  "method_not_allowed",
                  "idempotency_conflict",
                  "text_too_long",
                  "unknown_field",
                  "invalid_input",
                  "input_too_long",
                  "training_in_progress",
                  "insufficient_samples",
                  "output_unreliable",
                  "key_cap_exceeded",
                  "rate_limited",
                  "daily_ceiling_exceeded",
                  "tool_unavailable",
                  "model_unavailable",
                  "model_rejected",
                  "pinned_adapter_unavailable"
                ]
              },
              "message": {
                "type": "string"
              },
              "field": {
                "type": "string"
              },
              "action_url": {
                "type": "string",
                "format": "uri"
              },
              "hint": {
                "type": "string"
              }
            }
          }
        }
      }
    }
  }
}
```

### HTTP 404

not_found: Rewrite not found.

```json
{
  "headers": {
    "Location": {
      "description": "Poll this job URL with the same Bearer key.",
      "schema": {
        "type": "string"
      }
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "object",
            "required": [
              "code",
              "message"
            ],
            "properties": {
              "code": {
                "type": "string",
                "enum": [
                  "idempotency_key_required",
                  "invalid_json",
                  "unauthorized",
                  "paid_plan_required",
                  "setup_required",
                  "quota_exceeded",
                  "payment_past_due",
                  "terms_required",
                  "forbidden_origin",
                  "permission_required",
                  "not_found",
                  "method_not_allowed",
                  "idempotency_conflict",
                  "text_too_long",
                  "unknown_field",
                  "invalid_input",
                  "input_too_long",
                  "training_in_progress",
                  "insufficient_samples",
                  "output_unreliable",
                  "key_cap_exceeded",
                  "rate_limited",
                  "daily_ceiling_exceeded",
                  "tool_unavailable",
                  "model_unavailable",
                  "model_rejected",
                  "pinned_adapter_unavailable"
                ]
              },
              "message": {
                "type": "string"
              },
              "field": {
                "type": "string"
              },
              "action_url": {
                "type": "string",
                "format": "uri"
              },
              "hint": {
                "type": "string"
              }
            }
          }
        }
      }
    }
  }
}
```

### HTTP 405

method_not_allowed: This method is not allowed for this endpoint.

```json
{
  "headers": {
    "Location": {
      "description": "Poll this job URL with the same Bearer key.",
      "schema": {
        "type": "string"
      }
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "object",
            "required": [
              "code",
              "message"
            ],
            "properties": {
              "code": {
                "type": "string",
                "enum": [
                  "idempotency_key_required",
                  "invalid_json",
                  "unauthorized",
                  "paid_plan_required",
                  "setup_required",
                  "quota_exceeded",
                  "payment_past_due",
                  "terms_required",
                  "forbidden_origin",
                  "permission_required",
                  "not_found",
                  "method_not_allowed",
                  "idempotency_conflict",
                  "text_too_long",
                  "unknown_field",
                  "invalid_input",
                  "input_too_long",
                  "training_in_progress",
                  "insufficient_samples",
                  "output_unreliable",
                  "key_cap_exceeded",
                  "rate_limited",
                  "daily_ceiling_exceeded",
                  "tool_unavailable",
                  "model_unavailable",
                  "model_rejected",
                  "pinned_adapter_unavailable"
                ]
              },
              "message": {
                "type": "string"
              },
              "field": {
                "type": "string"
              },
              "action_url": {
                "type": "string",
                "format": "uri"
              },
              "hint": {
                "type": "string"
              }
            }
          }
        }
      }
    }
  }
}
```

### HTTP 409

idempotency_conflict: This Idempotency-Key was already used with different text or settings.

```json
{
  "headers": {
    "Location": {
      "description": "Poll this job URL with the same Bearer key.",
      "schema": {
        "type": "string"
      }
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "object",
            "required": [
              "code",
              "message"
            ],
            "properties": {
              "code": {
                "type": "string",
                "enum": [
                  "idempotency_key_required",
                  "invalid_json",
                  "unauthorized",
                  "paid_plan_required",
                  "setup_required",
                  "quota_exceeded",
                  "payment_past_due",
                  "terms_required",
                  "forbidden_origin",
                  "permission_required",
                  "not_found",
                  "method_not_allowed",
                  "idempotency_conflict",
                  "text_too_long",
                  "unknown_field",
                  "invalid_input",
                  "input_too_long",
                  "training_in_progress",
                  "insufficient_samples",
                  "output_unreliable",
                  "key_cap_exceeded",
                  "rate_limited",
                  "daily_ceiling_exceeded",
                  "tool_unavailable",
                  "model_unavailable",
                  "model_rejected",
                  "pinned_adapter_unavailable"
                ]
              },
              "message": {
                "type": "string"
              },
              "field": {
                "type": "string"
              },
              "action_url": {
                "type": "string",
                "format": "uri"
              },
              "hint": {
                "type": "string"
              }
            }
          }
        }
      }
    }
  }
}
```

### HTTP 413

text_too_long: This text exceeds the request limit.

```json
{
  "headers": {
    "Location": {
      "description": "Poll this job URL with the same Bearer key.",
      "schema": {
        "type": "string"
      }
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "object",
            "required": [
              "code",
              "message"
            ],
            "properties": {
              "code": {
                "type": "string",
                "enum": [
                  "idempotency_key_required",
                  "invalid_json",
                  "unauthorized",
                  "paid_plan_required",
                  "setup_required",
                  "quota_exceeded",
                  "payment_past_due",
                  "terms_required",
                  "forbidden_origin",
                  "permission_required",
                  "not_found",
                  "method_not_allowed",
                  "idempotency_conflict",
                  "text_too_long",
                  "unknown_field",
                  "invalid_input",
                  "input_too_long",
                  "training_in_progress",
                  "insufficient_samples",
                  "output_unreliable",
                  "key_cap_exceeded",
                  "rate_limited",
                  "daily_ceiling_exceeded",
                  "tool_unavailable",
                  "model_unavailable",
                  "model_rejected",
                  "pinned_adapter_unavailable"
                ]
              },
              "message": {
                "type": "string"
              },
              "field": {
                "type": "string"
              },
              "action_url": {
                "type": "string",
                "format": "uri"
              },
              "hint": {
                "type": "string"
              }
            }
          }
        }
      }
    }
  }
}
```

### HTTP 422

unknown_field: Remove the unknown field.

invalid_input: Enter text and choose valid rewrite settings.

input_too_long: This text exceeds the request limit.

training_in_progress: This voice profile is still training.

insufficient_samples: This voice profile needs approved samples and an active adapter.

output_unreliable: This draft did not rewrite reliably, so we stopped. Your words were not used. Try a shorter section.

```json
{
  "headers": {
    "Location": {
      "description": "Poll this job URL with the same Bearer key.",
      "schema": {
        "type": "string"
      }
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "object",
            "required": [
              "code",
              "message"
            ],
            "properties": {
              "code": {
                "type": "string",
                "enum": [
                  "idempotency_key_required",
                  "invalid_json",
                  "unauthorized",
                  "paid_plan_required",
                  "setup_required",
                  "quota_exceeded",
                  "payment_past_due",
                  "terms_required",
                  "forbidden_origin",
                  "permission_required",
                  "not_found",
                  "method_not_allowed",
                  "idempotency_conflict",
                  "text_too_long",
                  "unknown_field",
                  "invalid_input",
                  "input_too_long",
                  "training_in_progress",
                  "insufficient_samples",
                  "output_unreliable",
                  "key_cap_exceeded",
                  "rate_limited",
                  "daily_ceiling_exceeded",
                  "tool_unavailable",
                  "model_unavailable",
                  "model_rejected",
                  "pinned_adapter_unavailable"
                ]
              },
              "message": {
                "type": "string"
              },
              "field": {
                "type": "string"
              },
              "action_url": {
                "type": "string",
                "format": "uri"
              },
              "hint": {
                "type": "string"
              }
            }
          }
        }
      }
    }
  }
}
```

### HTTP 429

key_cap_exceeded: This rewrite exceeds this API key's monthly word cap.

rate_limited: Too many rewrite requests. Try again later.

daily_ceiling_exceeded: The daily safety limit has been reached. Try again after 00:00 UTC.

```json
{
  "headers": {
    "Retry-After": {
      "description": "Seconds until retry, when supplied.",
      "schema": {
        "type": "string"
      }
    },
    "Location": {
      "description": "Poll this job URL with the same Bearer key.",
      "schema": {
        "type": "string"
      }
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "object",
            "required": [
              "code",
              "message"
            ],
            "properties": {
              "code": {
                "type": "string",
                "enum": [
                  "idempotency_key_required",
                  "invalid_json",
                  "unauthorized",
                  "paid_plan_required",
                  "setup_required",
                  "quota_exceeded",
                  "payment_past_due",
                  "terms_required",
                  "forbidden_origin",
                  "permission_required",
                  "not_found",
                  "method_not_allowed",
                  "idempotency_conflict",
                  "text_too_long",
                  "unknown_field",
                  "invalid_input",
                  "input_too_long",
                  "training_in_progress",
                  "insufficient_samples",
                  "output_unreliable",
                  "key_cap_exceeded",
                  "rate_limited",
                  "daily_ceiling_exceeded",
                  "tool_unavailable",
                  "model_unavailable",
                  "model_rejected",
                  "pinned_adapter_unavailable"
                ]
              },
              "message": {
                "type": "string"
              },
              "field": {
                "type": "string"
              },
              "action_url": {
                "type": "string",
                "format": "uri"
              },
              "hint": {
                "type": "string"
              }
            }
          }
        }
      }
    }
  }
}
```

### HTTP 503

tool_unavailable: Writing from a prompt is unavailable right now.

model_unavailable: The model is starting or unavailable. Try again shortly.

model_rejected: The model could not process this rewrite.

pinned_adapter_unavailable: The model version pinned to this rewrite is unavailable. Start a new rewrite.

```json
{
  "headers": {
    "Location": {
      "description": "Poll this job URL with the same Bearer key.",
      "schema": {
        "type": "string"
      }
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "object",
            "required": [
              "code",
              "message"
            ],
            "properties": {
              "code": {
                "type": "string",
                "enum": [
                  "idempotency_key_required",
                  "invalid_json",
                  "unauthorized",
                  "paid_plan_required",
                  "setup_required",
                  "quota_exceeded",
                  "payment_past_due",
                  "terms_required",
                  "forbidden_origin",
                  "permission_required",
                  "not_found",
                  "method_not_allowed",
                  "idempotency_conflict",
                  "text_too_long",
                  "unknown_field",
                  "invalid_input",
                  "input_too_long",
                  "training_in_progress",
                  "insufficient_samples",
                  "output_unreliable",
                  "key_cap_exceeded",
                  "rate_limited",
                  "daily_ceiling_exceeded",
                  "tool_unavailable",
                  "model_unavailable",
                  "model_rejected",
                  "pinned_adapter_unavailable"
                ]
              },
              "message": {
                "type": "string"
              },
              "field": {
                "type": "string"
              },
              "action_url": {
                "type": "string",
                "format": "uri"
              },
              "hint": {
                "type": "string"
              }
            }
          }
        }
      }
    }
  }
}
```

Source: https://ink.ego.ist/docs/api/reference/cancel-rewrite


---

# Get feedback

`GET /api/v1/rewrites/{id}/feedback`

## Authentication

Bearer API key. A paid plan after trial and current terms are required, except when clearing feedback.

## Parameters

```json
[
  {
    "name": "id",
    "in": "path",
    "required": true,
    "schema": {
      "type": "string",
      "format": "uuid"
    }
  }
]
```

## Responses

### HTTP 200

Owned job feedback and credit eligibility.

```json
{
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "required": [
          "feedback",
          "creditedWords",
          "note_retention_days"
        ],
        "properties": {
          "feedback": {
            "anyOf": [
              {
                "type": "object",
                "required": [
                  "rating",
                  "reasons",
                  "note"
                ],
                "properties": {
                  "rating": {
                    "enum": [
                      "up",
                      "down"
                    ]
                  },
                  "reasons": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "note": {
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                }
              },
              {
                "type": "null"
              }
            ]
          },
          "creditedWords": {
            "type": "integer",
            "minimum": 0
          },
          "note_retention_days": {
            "type": "integer",
            "const": 90
          },
          "eligibleForCredit": {
            "type": "boolean"
          },
          "creditRequiresPaidPlan": {
            "type": "boolean"
          }
        }
      }
    }
  }
}
```

### HTTP 400

Missing Idempotency-Key or invalid JSON. invalid_input also uses 400 for lock edits and target word budget errors.

```json
{
  "headers": {
    "Location": {
      "description": "Poll this job URL with the same Bearer key.",
      "schema": {
        "type": "string"
      }
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "object",
            "required": [
              "code",
              "message"
            ],
            "properties": {
              "code": {
                "type": "string",
                "enum": [
                  "idempotency_key_required",
                  "invalid_json",
                  "unauthorized",
                  "paid_plan_required",
                  "setup_required",
                  "quota_exceeded",
                  "payment_past_due",
                  "terms_required",
                  "forbidden_origin",
                  "permission_required",
                  "not_found",
                  "method_not_allowed",
                  "idempotency_conflict",
                  "text_too_long",
                  "unknown_field",
                  "invalid_input",
                  "input_too_long",
                  "training_in_progress",
                  "insufficient_samples",
                  "output_unreliable",
                  "key_cap_exceeded",
                  "rate_limited",
                  "daily_ceiling_exceeded",
                  "tool_unavailable",
                  "model_unavailable",
                  "model_rejected",
                  "pinned_adapter_unavailable"
                ]
              },
              "message": {
                "type": "string"
              },
              "field": {
                "type": "string"
              },
              "action_url": {
                "type": "string",
                "format": "uri"
              },
              "hint": {
                "type": "string"
              }
            }
          }
        }
      }
    }
  }
}
```

### HTTP 401

unauthorized: A valid API key is required.

```json
{
  "headers": {
    "Location": {
      "description": "Poll this job URL with the same Bearer key.",
      "schema": {
        "type": "string"
      }
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "object",
            "required": [
              "code",
              "message"
            ],
            "properties": {
              "code": {
                "type": "string",
                "enum": [
                  "idempotency_key_required",
                  "invalid_json",
                  "unauthorized",
                  "paid_plan_required",
                  "setup_required",
                  "quota_exceeded",
                  "payment_past_due",
                  "terms_required",
                  "forbidden_origin",
                  "permission_required",
                  "not_found",
                  "method_not_allowed",
                  "idempotency_conflict",
                  "text_too_long",
                  "unknown_field",
                  "invalid_input",
                  "input_too_long",
                  "training_in_progress",
                  "insufficient_samples",
                  "output_unreliable",
                  "key_cap_exceeded",
                  "rate_limited",
                  "daily_ceiling_exceeded",
                  "tool_unavailable",
                  "model_unavailable",
                  "model_rejected",
                  "pinned_adapter_unavailable"
                ]
              },
              "message": {
                "type": "string"
              },
              "field": {
                "type": "string"
              },
              "action_url": {
                "type": "string",
                "format": "uri"
              },
              "hint": {
                "type": "string"
              }
            }
          }
        }
      }
    }
  }
}
```

### HTTP 402

paid_plan_required: API keys require a paid subscription. Trials do not qualify.

setup_required: Choose an Ink plan to rewrite.

quota_exceeded: This rewrite exceeds your remaining word allowance.

payment_past_due: Your last payment failed. Update your card in Billing.

```json
{
  "headers": {
    "Location": {
      "description": "Poll this job URL with the same Bearer key.",
      "schema": {
        "type": "string"
      }
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "object",
            "required": [
              "code",
              "message"
            ],
            "properties": {
              "code": {
                "type": "string",
                "enum": [
                  "idempotency_key_required",
                  "invalid_json",
                  "unauthorized",
                  "paid_plan_required",
                  "setup_required",
                  "quota_exceeded",
                  "payment_past_due",
                  "terms_required",
                  "forbidden_origin",
                  "permission_required",
                  "not_found",
                  "method_not_allowed",
                  "idempotency_conflict",
                  "text_too_long",
                  "unknown_field",
                  "invalid_input",
                  "input_too_long",
                  "training_in_progress",
                  "insufficient_samples",
                  "output_unreliable",
                  "key_cap_exceeded",
                  "rate_limited",
                  "daily_ceiling_exceeded",
                  "tool_unavailable",
                  "model_unavailable",
                  "model_rejected",
                  "pinned_adapter_unavailable"
                ]
              },
              "message": {
                "type": "string"
              },
              "field": {
                "type": "string"
              },
              "action_url": {
                "type": "string",
                "format": "uri"
              },
              "hint": {
                "type": "string"
              }
            }
          }
        }
      }
    }
  }
}
```

### HTTP 403

terms_required: Accept Ink terms to continue.

forbidden_origin: This request must come from Ink.

permission_required: Passport permission is required to use this voice. Review access or delete the adapter.

```json
{
  "headers": {
    "Location": {
      "description": "Poll this job URL with the same Bearer key.",
      "schema": {
        "type": "string"
      }
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "object",
            "required": [
              "code",
              "message"
            ],
            "properties": {
              "code": {
                "type": "string",
                "enum": [
                  "idempotency_key_required",
                  "invalid_json",
                  "unauthorized",
                  "paid_plan_required",
                  "setup_required",
                  "quota_exceeded",
                  "payment_past_due",
                  "terms_required",
                  "forbidden_origin",
                  "permission_required",
                  "not_found",
                  "method_not_allowed",
                  "idempotency_conflict",
                  "text_too_long",
                  "unknown_field",
                  "invalid_input",
                  "input_too_long",
                  "training_in_progress",
                  "insufficient_samples",
                  "output_unreliable",
                  "key_cap_exceeded",
                  "rate_limited",
                  "daily_ceiling_exceeded",
                  "tool_unavailable",
                  "model_unavailable",
                  "model_rejected",
                  "pinned_adapter_unavailable"
                ]
              },
              "message": {
                "type": "string"
              },
              "field": {
                "type": "string"
              },
              "action_url": {
                "type": "string",
                "format": "uri"
              },
              "hint": {
                "type": "string"
              }
            }
          }
        }
      }
    }
  }
}
```

### HTTP 404

not_found: Rewrite not found.

```json
{
  "headers": {
    "Location": {
      "description": "Poll this job URL with the same Bearer key.",
      "schema": {
        "type": "string"
      }
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "object",
            "required": [
              "code",
              "message"
            ],
            "properties": {
              "code": {
                "type": "string",
                "enum": [
                  "idempotency_key_required",
                  "invalid_json",
                  "unauthorized",
                  "paid_plan_required",
                  "setup_required",
                  "quota_exceeded",
                  "payment_past_due",
                  "terms_required",
                  "forbidden_origin",
                  "permission_required",
                  "not_found",
                  "method_not_allowed",
                  "idempotency_conflict",
                  "text_too_long",
                  "unknown_field",
                  "invalid_input",
                  "input_too_long",
                  "training_in_progress",
                  "insufficient_samples",
                  "output_unreliable",
                  "key_cap_exceeded",
                  "rate_limited",
                  "daily_ceiling_exceeded",
                  "tool_unavailable",
                  "model_unavailable",
                  "model_rejected",
                  "pinned_adapter_unavailable"
                ]
              },
              "message": {
                "type": "string"
              },
              "field": {
                "type": "string"
              },
              "action_url": {
                "type": "string",
                "format": "uri"
              },
              "hint": {
                "type": "string"
              }
            }
          }
        }
      }
    }
  }
}
```

### HTTP 405

method_not_allowed: This method is not allowed for this endpoint.

```json
{
  "headers": {
    "Location": {
      "description": "Poll this job URL with the same Bearer key.",
      "schema": {
        "type": "string"
      }
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "object",
            "required": [
              "code",
              "message"
            ],
            "properties": {
              "code": {
                "type": "string",
                "enum": [
                  "idempotency_key_required",
                  "invalid_json",
                  "unauthorized",
                  "paid_plan_required",
                  "setup_required",
                  "quota_exceeded",
                  "payment_past_due",
                  "terms_required",
                  "forbidden_origin",
                  "permission_required",
                  "not_found",
                  "method_not_allowed",
                  "idempotency_conflict",
                  "text_too_long",
                  "unknown_field",
                  "invalid_input",
                  "input_too_long",
                  "training_in_progress",
                  "insufficient_samples",
                  "output_unreliable",
                  "key_cap_exceeded",
                  "rate_limited",
                  "daily_ceiling_exceeded",
                  "tool_unavailable",
                  "model_unavailable",
                  "model_rejected",
                  "pinned_adapter_unavailable"
                ]
              },
              "message": {
                "type": "string"
              },
              "field": {
                "type": "string"
              },
              "action_url": {
                "type": "string",
                "format": "uri"
              },
              "hint": {
                "type": "string"
              }
            }
          }
        }
      }
    }
  }
}
```

### HTTP 409

idempotency_conflict: This Idempotency-Key was already used with different text or settings.

```json
{
  "headers": {
    "Location": {
      "description": "Poll this job URL with the same Bearer key.",
      "schema": {
        "type": "string"
      }
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "object",
            "required": [
              "code",
              "message"
            ],
            "properties": {
              "code": {
                "type": "string",
                "enum": [
                  "idempotency_key_required",
                  "invalid_json",
                  "unauthorized",
                  "paid_plan_required",
                  "setup_required",
                  "quota_exceeded",
                  "payment_past_due",
                  "terms_required",
                  "forbidden_origin",
                  "permission_required",
                  "not_found",
                  "method_not_allowed",
                  "idempotency_conflict",
                  "text_too_long",
                  "unknown_field",
                  "invalid_input",
                  "input_too_long",
                  "training_in_progress",
                  "insufficient_samples",
                  "output_unreliable",
                  "key_cap_exceeded",
                  "rate_limited",
                  "daily_ceiling_exceeded",
                  "tool_unavailable",
                  "model_unavailable",
                  "model_rejected",
                  "pinned_adapter_unavailable"
                ]
              },
              "message": {
                "type": "string"
              },
              "field": {
                "type": "string"
              },
              "action_url": {
                "type": "string",
                "format": "uri"
              },
              "hint": {
                "type": "string"
              }
            }
          }
        }
      }
    }
  }
}
```

### HTTP 413

text_too_long: This text exceeds the request limit.

```json
{
  "headers": {
    "Location": {
      "description": "Poll this job URL with the same Bearer key.",
      "schema": {
        "type": "string"
      }
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "object",
            "required": [
              "code",
              "message"
            ],
            "properties": {
              "code": {
                "type": "string",
                "enum": [
                  "idempotency_key_required",
                  "invalid_json",
                  "unauthorized",
                  "paid_plan_required",
                  "setup_required",
                  "quota_exceeded",
                  "payment_past_due",
                  "terms_required",
                  "forbidden_origin",
                  "permission_required",
                  "not_found",
                  "method_not_allowed",
                  "idempotency_conflict",
                  "text_too_long",
                  "unknown_field",
                  "invalid_input",
                  "input_too_long",
                  "training_in_progress",
                  "insufficient_samples",
                  "output_unreliable",
                  "key_cap_exceeded",
                  "rate_limited",
                  "daily_ceiling_exceeded",
                  "tool_unavailable",
                  "model_unavailable",
                  "model_rejected",
                  "pinned_adapter_unavailable"
                ]
              },
              "message": {
                "type": "string"
              },
              "field": {
                "type": "string"
              },
              "action_url": {
                "type": "string",
                "format": "uri"
              },
              "hint": {
                "type": "string"
              }
            }
          }
        }
      }
    }
  }
}
```

### HTTP 422

unknown_field: Remove the unknown field.

invalid_input: Enter text and choose valid rewrite settings.

input_too_long: This text exceeds the request limit.

training_in_progress: This voice profile is still training.

insufficient_samples: This voice profile needs approved samples and an active adapter.

output_unreliable: This draft did not rewrite reliably, so we stopped. Your words were not used. Try a shorter section.

```json
{
  "headers": {
    "Location": {
      "description": "Poll this job URL with the same Bearer key.",
      "schema": {
        "type": "string"
      }
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "object",
            "required": [
              "code",
              "message"
            ],
            "properties": {
              "code": {
                "type": "string",
                "enum": [
                  "idempotency_key_required",
                  "invalid_json",
                  "unauthorized",
                  "paid_plan_required",
                  "setup_required",
                  "quota_exceeded",
                  "payment_past_due",
                  "terms_required",
                  "forbidden_origin",
                  "permission_required",
                  "not_found",
                  "method_not_allowed",
                  "idempotency_conflict",
                  "text_too_long",
                  "unknown_field",
                  "invalid_input",
                  "input_too_long",
                  "training_in_progress",
                  "insufficient_samples",
                  "output_unreliable",
                  "key_cap_exceeded",
                  "rate_limited",
                  "daily_ceiling_exceeded",
                  "tool_unavailable",
                  "model_unavailable",
                  "model_rejected",
                  "pinned_adapter_unavailable"
                ]
              },
              "message": {
                "type": "string"
              },
              "field": {
                "type": "string"
              },
              "action_url": {
                "type": "string",
                "format": "uri"
              },
              "hint": {
                "type": "string"
              }
            }
          }
        }
      }
    }
  }
}
```

### HTTP 429

key_cap_exceeded: This rewrite exceeds this API key's monthly word cap.

rate_limited: Too many rewrite requests. Try again later.

daily_ceiling_exceeded: The daily safety limit has been reached. Try again after 00:00 UTC.

```json
{
  "headers": {
    "Retry-After": {
      "description": "Seconds until retry, when supplied.",
      "schema": {
        "type": "string"
      }
    },
    "Location": {
      "description": "Poll this job URL with the same Bearer key.",
      "schema": {
        "type": "string"
      }
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "object",
            "required": [
              "code",
              "message"
            ],
            "properties": {
              "code": {
                "type": "string",
                "enum": [
                  "idempotency_key_required",
                  "invalid_json",
                  "unauthorized",
                  "paid_plan_required",
                  "setup_required",
                  "quota_exceeded",
                  "payment_past_due",
                  "terms_required",
                  "forbidden_origin",
                  "permission_required",
                  "not_found",
                  "method_not_allowed",
                  "idempotency_conflict",
                  "text_too_long",
                  "unknown_field",
                  "invalid_input",
                  "input_too_long",
                  "training_in_progress",
                  "insufficient_samples",
                  "output_unreliable",
                  "key_cap_exceeded",
                  "rate_limited",
                  "daily_ceiling_exceeded",
                  "tool_unavailable",
                  "model_unavailable",
                  "model_rejected",
                  "pinned_adapter_unavailable"
                ]
              },
              "message": {
                "type": "string"
              },
              "field": {
                "type": "string"
              },
              "action_url": {
                "type": "string",
                "format": "uri"
              },
              "hint": {
                "type": "string"
              }
            }
          }
        }
      }
    }
  }
}
```

### HTTP 503

tool_unavailable: Writing from a prompt is unavailable right now.

model_unavailable: The model is starting or unavailable. Try again shortly.

model_rejected: The model could not process this rewrite.

pinned_adapter_unavailable: The model version pinned to this rewrite is unavailable. Start a new rewrite.

```json
{
  "headers": {
    "Location": {
      "description": "Poll this job URL with the same Bearer key.",
      "schema": {
        "type": "string"
      }
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "object",
            "required": [
              "code",
              "message"
            ],
            "properties": {
              "code": {
                "type": "string",
                "enum": [
                  "idempotency_key_required",
                  "invalid_json",
                  "unauthorized",
                  "paid_plan_required",
                  "setup_required",
                  "quota_exceeded",
                  "payment_past_due",
                  "terms_required",
                  "forbidden_origin",
                  "permission_required",
                  "not_found",
                  "method_not_allowed",
                  "idempotency_conflict",
                  "text_too_long",
                  "unknown_field",
                  "invalid_input",
                  "input_too_long",
                  "training_in_progress",
                  "insufficient_samples",
                  "output_unreliable",
                  "key_cap_exceeded",
                  "rate_limited",
                  "daily_ceiling_exceeded",
                  "tool_unavailable",
                  "model_unavailable",
                  "model_rejected",
                  "pinned_adapter_unavailable"
                ]
              },
              "message": {
                "type": "string"
              },
              "field": {
                "type": "string"
              },
              "action_url": {
                "type": "string",
                "format": "uri"
              },
              "hint": {
                "type": "string"
              }
            }
          }
        }
      }
    }
  }
}
```

Source: https://ink.ego.ist/docs/api/reference/get-feedback


---

# Save or clear feedback

`POST /api/v1/rewrites/{id}/feedback`

Only completed, completed_with_warnings or needs_review jobs accept feedback. Sending feedback shares original text, output and note with Ink to improve and train its models. Text and notes expire after 90 days. Editing does not restart text retention. Clear with {"rating":null}, including without current terms. Only down accepts reasons. Notes allow at most 500 Unicode characters. Bodies allow at most 8,192 bytes. Feedback writes share 30 per minute per user.

## Authentication

Bearer API key. A paid plan after trial and current terms are required, except when clearing feedback.

## Parameters

```json
[
  {
    "name": "id",
    "in": "path",
    "required": true,
    "schema": {
      "type": "string",
      "format": "uuid"
    }
  }
]
```

## Request body

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "rating": {
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "up",
            "down"
          ]
        },
        {
          "type": "null"
        }
      ]
    },
    "reasons": {
      "default": [],
      "maxItems": 5,
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "Changed my meaning",
          "Still reads as AI",
          "Wrong tone",
          "Dropped facts or details",
          "Other"
        ]
      }
    },
    "note": {
      "type": [
        "string",
        "null"
      ]
    }
  },
  "required": [
    "rating"
  ],
  "additionalProperties": false
}
```

## Responses

### HTTP 200

Saved or cleared feedback.

```json
{
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "required": [
          "feedback",
          "creditedWords",
          "note_retention_days"
        ],
        "properties": {
          "feedback": {
            "anyOf": [
              {
                "type": "object",
                "required": [
                  "rating",
                  "reasons",
                  "note"
                ],
                "properties": {
                  "rating": {
                    "enum": [
                      "up",
                      "down"
                    ]
                  },
                  "reasons": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "note": {
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                }
              },
              {
                "type": "null"
              }
            ]
          },
          "creditedWords": {
            "type": "integer",
            "minimum": 0
          },
          "note_retention_days": {
            "type": "integer",
            "const": 90
          },
          "eligibleForCredit": {
            "type": "boolean"
          },
          "creditRequiresPaidPlan": {
            "type": "boolean"
          }
        }
      }
    }
  }
}
```

### HTTP 400

Missing Idempotency-Key or invalid JSON. invalid_input also uses 400 for lock edits and target word budget errors.

```json
{
  "headers": {
    "Location": {
      "description": "Poll this job URL with the same Bearer key.",
      "schema": {
        "type": "string"
      }
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "object",
            "required": [
              "code",
              "message"
            ],
            "properties": {
              "code": {
                "type": "string",
                "enum": [
                  "idempotency_key_required",
                  "invalid_json",
                  "unauthorized",
                  "paid_plan_required",
                  "setup_required",
                  "quota_exceeded",
                  "payment_past_due",
                  "terms_required",
                  "forbidden_origin",
                  "permission_required",
                  "not_found",
                  "method_not_allowed",
                  "idempotency_conflict",
                  "text_too_long",
                  "unknown_field",
                  "invalid_input",
                  "input_too_long",
                  "training_in_progress",
                  "insufficient_samples",
                  "output_unreliable",
                  "key_cap_exceeded",
                  "rate_limited",
                  "daily_ceiling_exceeded",
                  "tool_unavailable",
                  "model_unavailable",
                  "model_rejected",
                  "pinned_adapter_unavailable"
                ]
              },
              "message": {
                "type": "string"
              },
              "field": {
                "type": "string"
              },
              "action_url": {
                "type": "string",
                "format": "uri"
              },
              "hint": {
                "type": "string"
              }
            }
          }
        }
      }
    }
  }
}
```

### HTTP 401

unauthorized: A valid API key is required.

```json
{
  "headers": {
    "Location": {
      "description": "Poll this job URL with the same Bearer key.",
      "schema": {
        "type": "string"
      }
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "object",
            "required": [
              "code",
              "message"
            ],
            "properties": {
              "code": {
                "type": "string",
                "enum": [
                  "idempotency_key_required",
                  "invalid_json",
                  "unauthorized",
                  "paid_plan_required",
                  "setup_required",
                  "quota_exceeded",
                  "payment_past_due",
                  "terms_required",
                  "forbidden_origin",
                  "permission_required",
                  "not_found",
                  "method_not_allowed",
                  "idempotency_conflict",
                  "text_too_long",
                  "unknown_field",
                  "invalid_input",
                  "input_too_long",
                  "training_in_progress",
                  "insufficient_samples",
                  "output_unreliable",
                  "key_cap_exceeded",
                  "rate_limited",
                  "daily_ceiling_exceeded",
                  "tool_unavailable",
                  "model_unavailable",
                  "model_rejected",
                  "pinned_adapter_unavailable"
                ]
              },
              "message": {
                "type": "string"
              },
              "field": {
                "type": "string"
              },
              "action_url": {
                "type": "string",
                "format": "uri"
              },
              "hint": {
                "type": "string"
              }
            }
          }
        }
      }
    }
  }
}
```

### HTTP 402

paid_plan_required: API keys require a paid subscription. Trials do not qualify.

setup_required: Choose an Ink plan to rewrite.

quota_exceeded: This rewrite exceeds your remaining word allowance.

payment_past_due: Your last payment failed. Update your card in Billing.

```json
{
  "headers": {
    "Location": {
      "description": "Poll this job URL with the same Bearer key.",
      "schema": {
        "type": "string"
      }
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "object",
            "required": [
              "code",
              "message"
            ],
            "properties": {
              "code": {
                "type": "string",
                "enum": [
                  "idempotency_key_required",
                  "invalid_json",
                  "unauthorized",
                  "paid_plan_required",
                  "setup_required",
                  "quota_exceeded",
                  "payment_past_due",
                  "terms_required",
                  "forbidden_origin",
                  "permission_required",
                  "not_found",
                  "method_not_allowed",
                  "idempotency_conflict",
                  "text_too_long",
                  "unknown_field",
                  "invalid_input",
                  "input_too_long",
                  "training_in_progress",
                  "insufficient_samples",
                  "output_unreliable",
                  "key_cap_exceeded",
                  "rate_limited",
                  "daily_ceiling_exceeded",
                  "tool_unavailable",
                  "model_unavailable",
                  "model_rejected",
                  "pinned_adapter_unavailable"
                ]
              },
              "message": {
                "type": "string"
              },
              "field": {
                "type": "string"
              },
              "action_url": {
                "type": "string",
                "format": "uri"
              },
              "hint": {
                "type": "string"
              }
            }
          }
        }
      }
    }
  }
}
```

### HTTP 403

terms_required: Accept Ink terms to continue.

forbidden_origin: This request must come from Ink.

permission_required: Passport permission is required to use this voice. Review access or delete the adapter.

```json
{
  "headers": {
    "Location": {
      "description": "Poll this job URL with the same Bearer key.",
      "schema": {
        "type": "string"
      }
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "object",
            "required": [
              "code",
              "message"
            ],
            "properties": {
              "code": {
                "type": "string",
                "enum": [
                  "idempotency_key_required",
                  "invalid_json",
                  "unauthorized",
                  "paid_plan_required",
                  "setup_required",
                  "quota_exceeded",
                  "payment_past_due",
                  "terms_required",
                  "forbidden_origin",
                  "permission_required",
                  "not_found",
                  "method_not_allowed",
                  "idempotency_conflict",
                  "text_too_long",
                  "unknown_field",
                  "invalid_input",
                  "input_too_long",
                  "training_in_progress",
                  "insufficient_samples",
                  "output_unreliable",
                  "key_cap_exceeded",
                  "rate_limited",
                  "daily_ceiling_exceeded",
                  "tool_unavailable",
                  "model_unavailable",
                  "model_rejected",
                  "pinned_adapter_unavailable"
                ]
              },
              "message": {
                "type": "string"
              },
              "field": {
                "type": "string"
              },
              "action_url": {
                "type": "string",
                "format": "uri"
              },
              "hint": {
                "type": "string"
              }
            }
          }
        }
      }
    }
  }
}
```

### HTTP 404

not_found: Rewrite not found.

```json
{
  "headers": {
    "Location": {
      "description": "Poll this job URL with the same Bearer key.",
      "schema": {
        "type": "string"
      }
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "object",
            "required": [
              "code",
              "message"
            ],
            "properties": {
              "code": {
                "type": "string",
                "enum": [
                  "idempotency_key_required",
                  "invalid_json",
                  "unauthorized",
                  "paid_plan_required",
                  "setup_required",
                  "quota_exceeded",
                  "payment_past_due",
                  "terms_required",
                  "forbidden_origin",
                  "permission_required",
                  "not_found",
                  "method_not_allowed",
                  "idempotency_conflict",
                  "text_too_long",
                  "unknown_field",
                  "invalid_input",
                  "input_too_long",
                  "training_in_progress",
                  "insufficient_samples",
                  "output_unreliable",
                  "key_cap_exceeded",
                  "rate_limited",
                  "daily_ceiling_exceeded",
                  "tool_unavailable",
                  "model_unavailable",
                  "model_rejected",
                  "pinned_adapter_unavailable"
                ]
              },
              "message": {
                "type": "string"
              },
              "field": {
                "type": "string"
              },
              "action_url": {
                "type": "string",
                "format": "uri"
              },
              "hint": {
                "type": "string"
              }
            }
          }
        }
      }
    }
  }
}
```

### HTTP 405

method_not_allowed: This method is not allowed for this endpoint.

```json
{
  "headers": {
    "Location": {
      "description": "Poll this job URL with the same Bearer key.",
      "schema": {
        "type": "string"
      }
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "object",
            "required": [
              "code",
              "message"
            ],
            "properties": {
              "code": {
                "type": "string",
                "enum": [
                  "idempotency_key_required",
                  "invalid_json",
                  "unauthorized",
                  "paid_plan_required",
                  "setup_required",
                  "quota_exceeded",
                  "payment_past_due",
                  "terms_required",
                  "forbidden_origin",
                  "permission_required",
                  "not_found",
                  "method_not_allowed",
                  "idempotency_conflict",
                  "text_too_long",
                  "unknown_field",
                  "invalid_input",
                  "input_too_long",
                  "training_in_progress",
                  "insufficient_samples",
                  "output_unreliable",
                  "key_cap_exceeded",
                  "rate_limited",
                  "daily_ceiling_exceeded",
                  "tool_unavailable",
                  "model_unavailable",
                  "model_rejected",
                  "pinned_adapter_unavailable"
                ]
              },
              "message": {
                "type": "string"
              },
              "field": {
                "type": "string"
              },
              "action_url": {
                "type": "string",
                "format": "uri"
              },
              "hint": {
                "type": "string"
              }
            }
          }
        }
      }
    }
  }
}
```

### HTTP 409

idempotency_conflict: This Idempotency-Key was already used with different text or settings.

```json
{
  "headers": {
    "Location": {
      "description": "Poll this job URL with the same Bearer key.",
      "schema": {
        "type": "string"
      }
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "object",
            "required": [
              "code",
              "message"
            ],
            "properties": {
              "code": {
                "type": "string",
                "enum": [
                  "idempotency_key_required",
                  "invalid_json",
                  "unauthorized",
                  "paid_plan_required",
                  "setup_required",
                  "quota_exceeded",
                  "payment_past_due",
                  "terms_required",
                  "forbidden_origin",
                  "permission_required",
                  "not_found",
                  "method_not_allowed",
                  "idempotency_conflict",
                  "text_too_long",
                  "unknown_field",
                  "invalid_input",
                  "input_too_long",
                  "training_in_progress",
                  "insufficient_samples",
                  "output_unreliable",
                  "key_cap_exceeded",
                  "rate_limited",
                  "daily_ceiling_exceeded",
                  "tool_unavailable",
                  "model_unavailable",
                  "model_rejected",
                  "pinned_adapter_unavailable"
                ]
              },
              "message": {
                "type": "string"
              },
              "field": {
                "type": "string"
              },
              "action_url": {
                "type": "string",
                "format": "uri"
              },
              "hint": {
                "type": "string"
              }
            }
          }
        }
      }
    }
  }
}
```

### HTTP 413

text_too_long: This text exceeds the request limit.

```json
{
  "headers": {
    "Location": {
      "description": "Poll this job URL with the same Bearer key.",
      "schema": {
        "type": "string"
      }
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "object",
            "required": [
              "code",
              "message"
            ],
            "properties": {
              "code": {
                "type": "string",
                "enum": [
                  "idempotency_key_required",
                  "invalid_json",
                  "unauthorized",
                  "paid_plan_required",
                  "setup_required",
                  "quota_exceeded",
                  "payment_past_due",
                  "terms_required",
                  "forbidden_origin",
                  "permission_required",
                  "not_found",
                  "method_not_allowed",
                  "idempotency_conflict",
                  "text_too_long",
                  "unknown_field",
                  "invalid_input",
                  "input_too_long",
                  "training_in_progress",
                  "insufficient_samples",
                  "output_unreliable",
                  "key_cap_exceeded",
                  "rate_limited",
                  "daily_ceiling_exceeded",
                  "tool_unavailable",
                  "model_unavailable",
                  "model_rejected",
                  "pinned_adapter_unavailable"
                ]
              },
              "message": {
                "type": "string"
              },
              "field": {
                "type": "string"
              },
              "action_url": {
                "type": "string",
                "format": "uri"
              },
              "hint": {
                "type": "string"
              }
            }
          }
        }
      }
    }
  }
}
```

### HTTP 422

unknown_field: Remove the unknown field.

invalid_input: Enter text and choose valid rewrite settings.

input_too_long: This text exceeds the request limit.

training_in_progress: This voice profile is still training.

insufficient_samples: This voice profile needs approved samples and an active adapter.

output_unreliable: This draft did not rewrite reliably, so we stopped. Your words were not used. Try a shorter section.

```json
{
  "headers": {
    "Location": {
      "description": "Poll this job URL with the same Bearer key.",
      "schema": {
        "type": "string"
      }
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "object",
            "required": [
              "code",
              "message"
            ],
            "properties": {
              "code": {
                "type": "string",
                "enum": [
                  "idempotency_key_required",
                  "invalid_json",
                  "unauthorized",
                  "paid_plan_required",
                  "setup_required",
                  "quota_exceeded",
                  "payment_past_due",
                  "terms_required",
                  "forbidden_origin",
                  "permission_required",
                  "not_found",
                  "method_not_allowed",
                  "idempotency_conflict",
                  "text_too_long",
                  "unknown_field",
                  "invalid_input",
                  "input_too_long",
                  "training_in_progress",
                  "insufficient_samples",
                  "output_unreliable",
                  "key_cap_exceeded",
                  "rate_limited",
                  "daily_ceiling_exceeded",
                  "tool_unavailable",
                  "model_unavailable",
                  "model_rejected",
                  "pinned_adapter_unavailable"
                ]
              },
              "message": {
                "type": "string"
              },
              "field": {
                "type": "string"
              },
              "action_url": {
                "type": "string",
                "format": "uri"
              },
              "hint": {
                "type": "string"
              }
            }
          }
        }
      }
    }
  }
}
```

### HTTP 429

key_cap_exceeded: This rewrite exceeds this API key's monthly word cap.

rate_limited: Too many rewrite requests. Try again later.

daily_ceiling_exceeded: The daily safety limit has been reached. Try again after 00:00 UTC.

```json
{
  "headers": {
    "Retry-After": {
      "description": "Seconds until retry, when supplied.",
      "schema": {
        "type": "string"
      }
    },
    "Location": {
      "description": "Poll this job URL with the same Bearer key.",
      "schema": {
        "type": "string"
      }
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "object",
            "required": [
              "code",
              "message"
            ],
            "properties": {
              "code": {
                "type": "string",
                "enum": [
                  "idempotency_key_required",
                  "invalid_json",
                  "unauthorized",
                  "paid_plan_required",
                  "setup_required",
                  "quota_exceeded",
                  "payment_past_due",
                  "terms_required",
                  "forbidden_origin",
                  "permission_required",
                  "not_found",
                  "method_not_allowed",
                  "idempotency_conflict",
                  "text_too_long",
                  "unknown_field",
                  "invalid_input",
                  "input_too_long",
                  "training_in_progress",
                  "insufficient_samples",
                  "output_unreliable",
                  "key_cap_exceeded",
                  "rate_limited",
                  "daily_ceiling_exceeded",
                  "tool_unavailable",
                  "model_unavailable",
                  "model_rejected",
                  "pinned_adapter_unavailable"
                ]
              },
              "message": {
                "type": "string"
              },
              "field": {
                "type": "string"
              },
              "action_url": {
                "type": "string",
                "format": "uri"
              },
              "hint": {
                "type": "string"
              }
            }
          }
        }
      }
    }
  }
}
```

### HTTP 503

tool_unavailable: Writing from a prompt is unavailable right now.

model_unavailable: The model is starting or unavailable. Try again shortly.

model_rejected: The model could not process this rewrite.

pinned_adapter_unavailable: The model version pinned to this rewrite is unavailable. Start a new rewrite.

```json
{
  "headers": {
    "Location": {
      "description": "Poll this job URL with the same Bearer key.",
      "schema": {
        "type": "string"
      }
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "object",
            "required": [
              "code",
              "message"
            ],
            "properties": {
              "code": {
                "type": "string",
                "enum": [
                  "idempotency_key_required",
                  "invalid_json",
                  "unauthorized",
                  "paid_plan_required",
                  "setup_required",
                  "quota_exceeded",
                  "payment_past_due",
                  "terms_required",
                  "forbidden_origin",
                  "permission_required",
                  "not_found",
                  "method_not_allowed",
                  "idempotency_conflict",
                  "text_too_long",
                  "unknown_field",
                  "invalid_input",
                  "input_too_long",
                  "training_in_progress",
                  "insufficient_samples",
                  "output_unreliable",
                  "key_cap_exceeded",
                  "rate_limited",
                  "daily_ceiling_exceeded",
                  "tool_unavailable",
                  "model_unavailable",
                  "model_rejected",
                  "pinned_adapter_unavailable"
                ]
              },
              "message": {
                "type": "string"
              },
              "field": {
                "type": "string"
              },
              "action_url": {
                "type": "string",
                "format": "uri"
              },
              "hint": {
                "type": "string"
              }
            }
          }
        }
      }
    }
  }
}
```

Source: https://ink.ego.ist/docs/api/reference/save-feedback


---

# Write from a prompt

`POST /api/v1/writes`

Send all instructions in prompt, up to 6,000 words and 200,000 characters. Ink sends one user message without a system prompt. Reserve up to 4,000 output words; admission requires at least min(300, 4,000) available words and the API minimum of 100. Charge actual output words and refund the remainder. Failed or cancelled jobs refund the full reservation. Poll, cancel and give feedback through rewrite job URLs.

## Authentication

Bearer API key. A paid plan after trial and current terms are required, except when clearing feedback.

## Parameters

```json
[
  {
    "name": "Idempotency-Key",
    "in": "header",
    "required": true,
    "schema": {
      "type": "string",
      "format": "uuid"
    },
    "description": "Reuse a UUID for the same request. A changed request with the same UUID returns idempotency_conflict."
  }
]
```

## Request body

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "prompt": {
      "type": "string"
    }
  },
  "required": [
    "prompt"
  ],
  "additionalProperties": false
}
```

## Responses

### HTTP 200

Finished job. Review warnings and needs_review before using output.

```json
{
  "headers": {
    "Location": {
      "description": "Poll this job URL with the same Bearer key.",
      "schema": {
        "type": "string"
      }
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "required": [
          "id",
          "status",
          "blocks",
          "progress",
          "warnings",
          "input_words",
          "charged_words",
          "created_at",
          "finished_at"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "status": {
            "enum": [
              "queued",
              "rewriting",
              "validating",
              "completed",
              "completed_with_warnings",
              "needs_review",
              "failed",
              "cancelled"
            ]
          },
          "mode": {
            "const": "write"
          },
          "output": {
            "type": "string"
          },
          "change_summary": {
            "type": "string"
          },
          "input_words": {
            "type": "integer",
            "minimum": 0
          },
          "charged_words": {
            "type": "integer",
            "minimum": 0
          },
          "refunded_words": {
            "type": "integer",
            "minimum": 0
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "finished_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "warnings": {
            "type": "array",
            "description": "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.",
            "items": {
              "type": "object",
              "properties": {
                "code": {
                  "type": "string"
                },
                "message": {
                  "type": "string"
                },
                "missing": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "missing_count": {
                  "type": "integer",
                  "minimum": 0
                }
              }
            }
          },
          "blocks": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "index": {
                  "type": "integer",
                  "minimum": 0
                },
                "text": {
                  "type": "string"
                }
              }
            }
          },
          "progress": {
            "type": "object",
            "properties": {
              "phase": {
                "enum": [
                  "queued",
                  "starting_model",
                  "writing",
                  "rewriting",
                  "validating",
                  null
                ]
              },
              "blocks_done": {
                "type": "integer",
                "minimum": 0
              },
              "blocks_total": {
                "type": "integer",
                "minimum": 0
              }
            }
          },
          "fact_report": {
            "type": "object",
            "properties": {
              "total": {
                "type": "integer",
                "minimum": 0
              },
              "kept": {
                "type": "integer",
                "minimum": 0
              },
              "groups": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string"
                    },
                    "total": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "kept": {
                      "type": "integer",
                      "minimum": 0
                    }
                  }
                }
              },
              "changed": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "text": {
                      "type": "string"
                    },
                    "type": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "error": {
            "type": "object",
            "properties": {
              "code": {
                "type": "string"
              },
              "message": {
                "type": "string"
              }
            }
          }
        }
      }
    }
  }
}
```

### HTTP 202

Pending job. Poll Location until terminal.

```json
{
  "headers": {
    "Location": {
      "description": "Poll this job URL with the same Bearer key.",
      "schema": {
        "type": "string"
      }
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "required": [
          "id",
          "status"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "status": {
            "enum": [
              "queued",
              "rewriting",
              "validating"
            ]
          }
        }
      }
    }
  }
}
```

### HTTP 400

Missing Idempotency-Key or invalid JSON. invalid_input also uses 400 for lock edits and target word budget errors.

```json
{
  "headers": {
    "Location": {
      "description": "Poll this job URL with the same Bearer key.",
      "schema": {
        "type": "string"
      }
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "object",
            "required": [
              "code",
              "message"
            ],
            "properties": {
              "code": {
                "type": "string",
                "enum": [
                  "idempotency_key_required",
                  "invalid_json",
                  "unauthorized",
                  "paid_plan_required",
                  "setup_required",
                  "quota_exceeded",
                  "payment_past_due",
                  "terms_required",
                  "forbidden_origin",
                  "permission_required",
                  "not_found",
                  "method_not_allowed",
                  "idempotency_conflict",
                  "text_too_long",
                  "unknown_field",
                  "invalid_input",
                  "input_too_long",
                  "training_in_progress",
                  "insufficient_samples",
                  "output_unreliable",
                  "key_cap_exceeded",
                  "rate_limited",
                  "daily_ceiling_exceeded",
                  "tool_unavailable",
                  "model_unavailable",
                  "model_rejected",
                  "pinned_adapter_unavailable"
                ]
              },
              "message": {
                "type": "string"
              },
              "field": {
                "type": "string"
              },
              "action_url": {
                "type": "string",
                "format": "uri"
              },
              "hint": {
                "type": "string"
              }
            }
          }
        }
      }
    }
  }
}
```

### HTTP 401

unauthorized: A valid API key is required.

```json
{
  "headers": {
    "Location": {
      "description": "Poll this job URL with the same Bearer key.",
      "schema": {
        "type": "string"
      }
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "object",
            "required": [
              "code",
              "message"
            ],
            "properties": {
              "code": {
                "type": "string",
                "enum": [
                  "idempotency_key_required",
                  "invalid_json",
                  "unauthorized",
                  "paid_plan_required",
                  "setup_required",
                  "quota_exceeded",
                  "payment_past_due",
                  "terms_required",
                  "forbidden_origin",
                  "permission_required",
                  "not_found",
                  "method_not_allowed",
                  "idempotency_conflict",
                  "text_too_long",
                  "unknown_field",
                  "invalid_input",
                  "input_too_long",
                  "training_in_progress",
                  "insufficient_samples",
                  "output_unreliable",
                  "key_cap_exceeded",
                  "rate_limited",
                  "daily_ceiling_exceeded",
                  "tool_unavailable",
                  "model_unavailable",
                  "model_rejected",
                  "pinned_adapter_unavailable"
                ]
              },
              "message": {
                "type": "string"
              },
              "field": {
                "type": "string"
              },
              "action_url": {
                "type": "string",
                "format": "uri"
              },
              "hint": {
                "type": "string"
              }
            }
          }
        }
      }
    }
  }
}
```

### HTTP 402

paid_plan_required: API keys require a paid subscription. Trials do not qualify.

setup_required: Choose an Ink plan to rewrite.

quota_exceeded: This rewrite exceeds your remaining word allowance.

payment_past_due: Your last payment failed. Update your card in Billing.

```json
{
  "headers": {
    "Location": {
      "description": "Poll this job URL with the same Bearer key.",
      "schema": {
        "type": "string"
      }
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "object",
            "required": [
              "code",
              "message"
            ],
            "properties": {
              "code": {
                "type": "string",
                "enum": [
                  "idempotency_key_required",
                  "invalid_json",
                  "unauthorized",
                  "paid_plan_required",
                  "setup_required",
                  "quota_exceeded",
                  "payment_past_due",
                  "terms_required",
                  "forbidden_origin",
                  "permission_required",
                  "not_found",
                  "method_not_allowed",
                  "idempotency_conflict",
                  "text_too_long",
                  "unknown_field",
                  "invalid_input",
                  "input_too_long",
                  "training_in_progress",
                  "insufficient_samples",
                  "output_unreliable",
                  "key_cap_exceeded",
                  "rate_limited",
                  "daily_ceiling_exceeded",
                  "tool_unavailable",
                  "model_unavailable",
                  "model_rejected",
                  "pinned_adapter_unavailable"
                ]
              },
              "message": {
                "type": "string"
              },
              "field": {
                "type": "string"
              },
              "action_url": {
                "type": "string",
                "format": "uri"
              },
              "hint": {
                "type": "string"
              }
            }
          }
        }
      }
    }
  }
}
```

### HTTP 403

terms_required: Accept Ink terms to continue.

forbidden_origin: This request must come from Ink.

permission_required: Passport permission is required to use this voice. Review access or delete the adapter.

```json
{
  "headers": {
    "Location": {
      "description": "Poll this job URL with the same Bearer key.",
      "schema": {
        "type": "string"
      }
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "object",
            "required": [
              "code",
              "message"
            ],
            "properties": {
              "code": {
                "type": "string",
                "enum": [
                  "idempotency_key_required",
                  "invalid_json",
                  "unauthorized",
                  "paid_plan_required",
                  "setup_required",
                  "quota_exceeded",
                  "payment_past_due",
                  "terms_required",
                  "forbidden_origin",
                  "permission_required",
                  "not_found",
                  "method_not_allowed",
                  "idempotency_conflict",
                  "text_too_long",
                  "unknown_field",
                  "invalid_input",
                  "input_too_long",
                  "training_in_progress",
                  "insufficient_samples",
                  "output_unreliable",
                  "key_cap_exceeded",
                  "rate_limited",
                  "daily_ceiling_exceeded",
                  "tool_unavailable",
                  "model_unavailable",
                  "model_rejected",
                  "pinned_adapter_unavailable"
                ]
              },
              "message": {
                "type": "string"
              },
              "field": {
                "type": "string"
              },
              "action_url": {
                "type": "string",
                "format": "uri"
              },
              "hint": {
                "type": "string"
              }
            }
          }
        }
      }
    }
  }
}
```

### HTTP 404

not_found: Rewrite not found.

```json
{
  "headers": {
    "Location": {
      "description": "Poll this job URL with the same Bearer key.",
      "schema": {
        "type": "string"
      }
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "object",
            "required": [
              "code",
              "message"
            ],
            "properties": {
              "code": {
                "type": "string",
                "enum": [
                  "idempotency_key_required",
                  "invalid_json",
                  "unauthorized",
                  "paid_plan_required",
                  "setup_required",
                  "quota_exceeded",
                  "payment_past_due",
                  "terms_required",
                  "forbidden_origin",
                  "permission_required",
                  "not_found",
                  "method_not_allowed",
                  "idempotency_conflict",
                  "text_too_long",
                  "unknown_field",
                  "invalid_input",
                  "input_too_long",
                  "training_in_progress",
                  "insufficient_samples",
                  "output_unreliable",
                  "key_cap_exceeded",
                  "rate_limited",
                  "daily_ceiling_exceeded",
                  "tool_unavailable",
                  "model_unavailable",
                  "model_rejected",
                  "pinned_adapter_unavailable"
                ]
              },
              "message": {
                "type": "string"
              },
              "field": {
                "type": "string"
              },
              "action_url": {
                "type": "string",
                "format": "uri"
              },
              "hint": {
                "type": "string"
              }
            }
          }
        }
      }
    }
  }
}
```

### HTTP 405

method_not_allowed: This method is not allowed for this endpoint.

```json
{
  "headers": {
    "Location": {
      "description": "Poll this job URL with the same Bearer key.",
      "schema": {
        "type": "string"
      }
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "object",
            "required": [
              "code",
              "message"
            ],
            "properties": {
              "code": {
                "type": "string",
                "enum": [
                  "idempotency_key_required",
                  "invalid_json",
                  "unauthorized",
                  "paid_plan_required",
                  "setup_required",
                  "quota_exceeded",
                  "payment_past_due",
                  "terms_required",
                  "forbidden_origin",
                  "permission_required",
                  "not_found",
                  "method_not_allowed",
                  "idempotency_conflict",
                  "text_too_long",
                  "unknown_field",
                  "invalid_input",
                  "input_too_long",
                  "training_in_progress",
                  "insufficient_samples",
                  "output_unreliable",
                  "key_cap_exceeded",
                  "rate_limited",
                  "daily_ceiling_exceeded",
                  "tool_unavailable",
                  "model_unavailable",
                  "model_rejected",
                  "pinned_adapter_unavailable"
                ]
              },
              "message": {
                "type": "string"
              },
              "field": {
                "type": "string"
              },
              "action_url": {
                "type": "string",
                "format": "uri"
              },
              "hint": {
                "type": "string"
              }
            }
          }
        }
      }
    }
  }
}
```

### HTTP 409

idempotency_conflict: This Idempotency-Key was already used with different text or settings.

```json
{
  "headers": {
    "Location": {
      "description": "Poll this job URL with the same Bearer key.",
      "schema": {
        "type": "string"
      }
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "object",
            "required": [
              "code",
              "message"
            ],
            "properties": {
              "code": {
                "type": "string",
                "enum": [
                  "idempotency_key_required",
                  "invalid_json",
                  "unauthorized",
                  "paid_plan_required",
                  "setup_required",
                  "quota_exceeded",
                  "payment_past_due",
                  "terms_required",
                  "forbidden_origin",
                  "permission_required",
                  "not_found",
                  "method_not_allowed",
                  "idempotency_conflict",
                  "text_too_long",
                  "unknown_field",
                  "invalid_input",
                  "input_too_long",
                  "training_in_progress",
                  "insufficient_samples",
                  "output_unreliable",
                  "key_cap_exceeded",
                  "rate_limited",
                  "daily_ceiling_exceeded",
                  "tool_unavailable",
                  "model_unavailable",
                  "model_rejected",
                  "pinned_adapter_unavailable"
                ]
              },
              "message": {
                "type": "string"
              },
              "field": {
                "type": "string"
              },
              "action_url": {
                "type": "string",
                "format": "uri"
              },
              "hint": {
                "type": "string"
              }
            }
          }
        }
      }
    }
  }
}
```

### HTTP 413

text_too_long: This text exceeds the request limit.

```json
{
  "headers": {
    "Location": {
      "description": "Poll this job URL with the same Bearer key.",
      "schema": {
        "type": "string"
      }
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "object",
            "required": [
              "code",
              "message"
            ],
            "properties": {
              "code": {
                "type": "string",
                "enum": [
                  "idempotency_key_required",
                  "invalid_json",
                  "unauthorized",
                  "paid_plan_required",
                  "setup_required",
                  "quota_exceeded",
                  "payment_past_due",
                  "terms_required",
                  "forbidden_origin",
                  "permission_required",
                  "not_found",
                  "method_not_allowed",
                  "idempotency_conflict",
                  "text_too_long",
                  "unknown_field",
                  "invalid_input",
                  "input_too_long",
                  "training_in_progress",
                  "insufficient_samples",
                  "output_unreliable",
                  "key_cap_exceeded",
                  "rate_limited",
                  "daily_ceiling_exceeded",
                  "tool_unavailable",
                  "model_unavailable",
                  "model_rejected",
                  "pinned_adapter_unavailable"
                ]
              },
              "message": {
                "type": "string"
              },
              "field": {
                "type": "string"
              },
              "action_url": {
                "type": "string",
                "format": "uri"
              },
              "hint": {
                "type": "string"
              }
            }
          }
        }
      }
    }
  }
}
```

### HTTP 422

unknown_field: Remove the unknown field.

invalid_input: Enter text and choose valid rewrite settings.

input_too_long: This text exceeds the request limit.

training_in_progress: This voice profile is still training.

insufficient_samples: This voice profile needs approved samples and an active adapter.

output_unreliable: This draft did not rewrite reliably, so we stopped. Your words were not used. Try a shorter section.

```json
{
  "headers": {
    "Location": {
      "description": "Poll this job URL with the same Bearer key.",
      "schema": {
        "type": "string"
      }
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "object",
            "required": [
              "code",
              "message"
            ],
            "properties": {
              "code": {
                "type": "string",
                "enum": [
                  "idempotency_key_required",
                  "invalid_json",
                  "unauthorized",
                  "paid_plan_required",
                  "setup_required",
                  "quota_exceeded",
                  "payment_past_due",
                  "terms_required",
                  "forbidden_origin",
                  "permission_required",
                  "not_found",
                  "method_not_allowed",
                  "idempotency_conflict",
                  "text_too_long",
                  "unknown_field",
                  "invalid_input",
                  "input_too_long",
                  "training_in_progress",
                  "insufficient_samples",
                  "output_unreliable",
                  "key_cap_exceeded",
                  "rate_limited",
                  "daily_ceiling_exceeded",
                  "tool_unavailable",
                  "model_unavailable",
                  "model_rejected",
                  "pinned_adapter_unavailable"
                ]
              },
              "message": {
                "type": "string"
              },
              "field": {
                "type": "string"
              },
              "action_url": {
                "type": "string",
                "format": "uri"
              },
              "hint": {
                "type": "string"
              }
            }
          }
        }
      }
    }
  }
}
```

### HTTP 429

key_cap_exceeded: This rewrite exceeds this API key's monthly word cap.

rate_limited: Too many rewrite requests. Try again later.

daily_ceiling_exceeded: The daily safety limit has been reached. Try again after 00:00 UTC.

```json
{
  "headers": {
    "Retry-After": {
      "description": "Seconds until retry, when supplied.",
      "schema": {
        "type": "string"
      }
    },
    "Location": {
      "description": "Poll this job URL with the same Bearer key.",
      "schema": {
        "type": "string"
      }
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "object",
            "required": [
              "code",
              "message"
            ],
            "properties": {
              "code": {
                "type": "string",
                "enum": [
                  "idempotency_key_required",
                  "invalid_json",
                  "unauthorized",
                  "paid_plan_required",
                  "setup_required",
                  "quota_exceeded",
                  "payment_past_due",
                  "terms_required",
                  "forbidden_origin",
                  "permission_required",
                  "not_found",
                  "method_not_allowed",
                  "idempotency_conflict",
                  "text_too_long",
                  "unknown_field",
                  "invalid_input",
                  "input_too_long",
                  "training_in_progress",
                  "insufficient_samples",
                  "output_unreliable",
                  "key_cap_exceeded",
                  "rate_limited",
                  "daily_ceiling_exceeded",
                  "tool_unavailable",
                  "model_unavailable",
                  "model_rejected",
                  "pinned_adapter_unavailable"
                ]
              },
              "message": {
                "type": "string"
              },
              "field": {
                "type": "string"
              },
              "action_url": {
                "type": "string",
                "format": "uri"
              },
              "hint": {
                "type": "string"
              }
            }
          }
        }
      }
    }
  }
}
```

### HTTP 503

tool_unavailable: Writing from a prompt is unavailable right now.

model_unavailable: The model is starting or unavailable. Try again shortly.

model_rejected: The model could not process this rewrite.

pinned_adapter_unavailable: The model version pinned to this rewrite is unavailable. Start a new rewrite.

```json
{
  "headers": {
    "Location": {
      "description": "Poll this job URL with the same Bearer key.",
      "schema": {
        "type": "string"
      }
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "object",
            "required": [
              "code",
              "message"
            ],
            "properties": {
              "code": {
                "type": "string",
                "enum": [
                  "idempotency_key_required",
                  "invalid_json",
                  "unauthorized",
                  "paid_plan_required",
                  "setup_required",
                  "quota_exceeded",
                  "payment_past_due",
                  "terms_required",
                  "forbidden_origin",
                  "permission_required",
                  "not_found",
                  "method_not_allowed",
                  "idempotency_conflict",
                  "text_too_long",
                  "unknown_field",
                  "invalid_input",
                  "input_too_long",
                  "training_in_progress",
                  "insufficient_samples",
                  "output_unreliable",
                  "key_cap_exceeded",
                  "rate_limited",
                  "daily_ceiling_exceeded",
                  "tool_unavailable",
                  "model_unavailable",
                  "model_rejected",
                  "pinned_adapter_unavailable"
                ]
              },
              "message": {
                "type": "string"
              },
              "field": {
                "type": "string"
              },
              "action_url": {
                "type": "string",
                "format": "uri"
              },
              "hint": {
                "type": "string"
              }
            }
          }
        }
      }
    }
  }
}
```

Source: https://ink.ego.ist/docs/api/reference/create-write


---

# Create a claim link

`POST /api/agent/signup`

With the person's permission, create a signup handoff. No tokens or email are issued. The person signs in with the supplied email, accepts terms and enters a card. Claims expire after 24 hours with 5 failed attempts. Signup limits: 20/IP/hour and 3/email/hour. Email is trimmed and lowercased; locally blocked temporary domains are rejected. Body limit: 4,096 bytes.

## Authentication

Public endpoint. No credentials or cookies required.

## Request body

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "email": {
      "type": "string",
      "maxLength": 254,
      "format": "email",
      "pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
    },
    "plan": {
      "default": "ink",
      "type": "string",
      "enum": [
        "ink",
        "ink_pro"
      ]
    },
    "interval": {
      "default": "monthly",
      "type": "string",
      "enum": [
        "monthly",
        "annual"
      ]
    },
    "agent": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "minLength": 1,
          "maxLength": 100,
          "pattern": "^[^\\p{Cc}\\p{Cf}]+$"
        },
        "url": {
          "type": "string",
          "maxLength": 2048,
          "format": "uri"
        },
        "version": {
          "type": "string",
          "minLength": 1,
          "maxLength": 80,
          "pattern": "^[^\\p{Cc}\\p{Cf}]+$"
        }
      },
      "required": [
        "name"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "email"
  ],
  "additionalProperties": false
}
```

## Responses

### HTTP 201

Claim handoff. Existing and new emails receive the same shape.

```json
{
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "required": [
          "claim_code",
          "claim_url",
          "expires_at",
          "next_steps"
        ],
        "properties": {
          "claim_code": {
            "type": "string"
          },
          "claim_url": {
            "type": "string",
            "format": "uri"
          },
          "expires_at": {
            "type": "string",
            "format": "date-time"
          },
          "next_steps": {
            "type": "string"
          }
        }
      }
    }
  }
}
```

### HTTP 400

Signup error. Do not infer account existence or retry signup in a loop.

```json
{
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "string"
          }
        }
      }
    }
  }
}
```

### HTTP 413

Signup error. Do not infer account existence or retry signup in a loop.

```json
{
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "string"
          }
        }
      }
    }
  }
}
```

### HTTP 415

Signup error. Do not infer account existence or retry signup in a loop.

```json
{
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "string"
          }
        }
      }
    }
  }
}
```

### HTTP 429

Signup error. Do not infer account existence or retry signup in a loop.

```json
{
  "headers": {
    "Retry-After": {
      "schema": {
        "type": "string"
      }
    }
  },
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "string"
          }
        }
      }
    }
  }
}
```

### HTTP 503

Signup error. Do not infer account existence or retry signup in a loop.

```json
{
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "string"
          }
        }
      }
    }
  }
}
```

Source: https://ink.ego.ist/docs/api/reference/agent-signup
