{"openapi":"3.1.0","info":{"title":"TurnItHuman API","version":"1.0.0","description":"Humanize AI-assisted text and read an independent multi-detector estimate. No detector outcome is guaranteed, and no endpoint checks Turnitin.","termsOfService":"https://turnithuman.com/terms/","contact":{"email":"hello@turnithuman.com"}},"servers":[{"url":"https://turnithuman.com/v1","description":"This environment"}],"security":[{"bearerAuth":[]},{"cookieAuth":[]}],"paths":{"/jobs":{"post":{"operationId":"createJob","summary":"Create a humanization job (plain text, or Markdown with input_format markdown)","security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"16 to 128 chars of [A-Za-z0-9_.:-]","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobCreateRequest"}}}},"responses":{"202":{"description":"HTTP 202","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobCreated"}}}},"401":{"description":"UNAUTHENTICATED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"INSUFFICIENT_WORDS","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"PLAN_REQUIRED, TRIAL_ALREADY_USED, TURNSTILE_FAILED, FEATURE_DISABLED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"STYLE_NOT_FOUND","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"VALIDATION_ERROR, IDEMPOTENCY_CONFLICT, TEXT_TOO_SHORT, TEXT_TOO_LONG, UNSUPPORTED_LANGUAGE","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"CONCURRENCY_LIMIT, RATE_LIMITED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"INTERNAL_ERROR","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"UPSTREAM_CREDITS_EXHAUSTED, INTAKE_PAUSED, DAILY_CAPACITY_REACHED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"get":{"operationId":"listJobs","summary":"List job summaries","security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"name":"limit","in":"query","required":false,"description":"1 to 100, default 20","schema":{"type":"string"}},{"name":"cursor","in":"query","required":false,"description":"Opaque cursor from a previous next_cursor","schema":{"type":"string"}},{"name":"status","in":"query","required":false,"description":"Comma-separated job statuses","schema":{"type":"string"}},{"name":"preset","in":"query","required":false,"description":"Comma-separated preset ids","schema":{"type":"string"}},{"name":"strategy","in":"query","required":false,"description":"Comma-separated strategy ids","schema":{"type":"string"}},{"name":"source","in":"query","required":false,"description":"app or api","schema":{"type":"string"}},{"name":"created_after","in":"query","required":false,"description":"RFC 3339 timestamp","schema":{"type":"string"}},{"name":"created_before","in":"query","required":false,"description":"RFC 3339 timestamp","schema":{"type":"string"}}],"responses":{"200":{"description":"HTTP 200","content":{"application/json":{"schema":{"type":"object","required":["data","next_cursor","has_more"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/JobSummary"}},"next_cursor":{"type":["string","null"]},"has_more":{"type":"boolean"}}}}}},"401":{"description":"UNAUTHENTICATED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"VALIDATION_ERROR","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"INTERNAL_ERROR","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/jobs/{id}":{"get":{"operationId":"getJob","summary":"Read a job, including texts","security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"summary for the list shape","schema":{"type":"string"}}],"responses":{"200":{"description":"HTTP 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}}},"401":{"description":"UNAUTHENTICATED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"JOB_NOT_FOUND","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"INTERNAL_ERROR","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"deleteJob","summary":"Delete a finished job and its texts","security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Deleted"},"401":{"description":"UNAUTHENTICATED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"JOB_NOT_FOUND","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"JOB_NOT_DELETABLE","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"INTERNAL_ERROR","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/jobs/{id}/events":{"get":{"operationId":"streamJobEvents","summary":"Server-sent events for a job","security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"text/event-stream of job.status, job.progress, job.error and job.done events","content":{"text/event-stream":{"schema":{"type":"string"}}},"x-events":{"job.status":{"$ref":"#/components/schemas/JobStatusEvent"},"job.progress":{"$ref":"#/components/schemas/JobProgressEvent"},"job.error":{"$ref":"#/components/schemas/JobErrorEvent"},"job.done":{"$ref":"#/components/schemas/Job"}}},"401":{"description":"UNAUTHENTICATED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"JOB_NOT_FOUND","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"INTERNAL_ERROR","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/jobs/{id}/rehumanize":{"post":{"operationId":"rehumanizeJob","summary":"Run the humanizer again (new charge)","security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"16 to 128 chars of [A-Za-z0-9_.:-]","schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RehumanizeRequest"}}}},"responses":{"202":{"description":"HTTP 202","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobCreated"}}}},"401":{"description":"UNAUTHENTICATED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"INSUFFICIENT_WORDS","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"PLAN_REQUIRED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"JOB_NOT_FOUND","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"JOB_NOT_REHUMANIZABLE, REHUMANIZE_LIMIT_REACHED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"VALIDATION_ERROR, IDEMPOTENCY_CONFLICT","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"CONCURRENCY_LIMIT, RATE_LIMITED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"INTERNAL_ERROR","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"UPSTREAM_CREDITS_EXHAUSTED, INTAKE_PAUSED, DAILY_CAPACITY_REACHED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/jobs/{id}/cancel":{"post":{"operationId":"cancelJob","summary":"Cancel a running job","security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The cancelled job summary"},"401":{"description":"UNAUTHENTICATED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"JOB_NOT_FOUND","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"JOB_NOT_CANCELLABLE","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"INTERNAL_ERROR","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/detect":{"post":{"operationId":"detectText","summary":"Standalone detector check","security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"16 to 128 chars of [A-Za-z0-9_.:-]","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DetectRequest"}}}},"responses":{"200":{"description":"HTTP 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DetectorRun"}}}},"401":{"description":"UNAUTHENTICATED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"INSUFFICIENT_WORDS","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"PLAN_REQUIRED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"VALIDATION_ERROR, TEXT_TOO_SHORT, TEXT_TOO_LONG, UNSUPPORTED_LANGUAGE, IDEMPOTENCY_CONFLICT","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"RATE_LIMITED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"INTERNAL_ERROR","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"UPSTREAM_UNAVAILABLE","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"UPSTREAM_BUSY, UPSTREAM_CREDITS_EXHAUSTED, DAILY_CAPACITY_REACHED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"504":{"description":"UPSTREAM_TIMEOUT","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"get":{"operationId":"listDetectorRuns","summary":"List standalone detector runs","security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"name":"limit","in":"query","required":false,"description":"1 to 100, default 20","schema":{"type":"string"}},{"name":"cursor","in":"query","required":false,"description":"Opaque cursor from a previous next_cursor","schema":{"type":"string"}}],"responses":{"200":{"description":"HTTP 200","content":{"application/json":{"schema":{"type":"object","required":["data","next_cursor","has_more"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/DetectorRun"}},"next_cursor":{"type":["string","null"]},"has_more":{"type":"boolean"}}}}}},"401":{"description":"UNAUTHENTICATED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"VALIDATION_ERROR","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"INTERNAL_ERROR","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/detect/{id}":{"get":{"operationId":"getDetectorRun","summary":"Read one detector run","security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"HTTP 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DetectorRun"}}}},"401":{"description":"UNAUTHENTICATED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"NOT_FOUND","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"INTERNAL_ERROR","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/styles":{"get":{"operationId":"listStyles","summary":"List style profiles","security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"name":"limit","in":"query","required":false,"description":"1 to 100, default 20","schema":{"type":"string"}},{"name":"cursor","in":"query","required":false,"description":"Opaque cursor from a previous next_cursor","schema":{"type":"string"}}],"responses":{"200":{"description":"HTTP 200","content":{"application/json":{"schema":{"type":"object","required":["data","next_cursor","has_more"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Style"}},"next_cursor":{"type":["string","null"]},"has_more":{"type":"boolean"}}}}}},"401":{"description":"UNAUTHENTICATED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"PLAN_REQUIRED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"INTERNAL_ERROR","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"createStyle","summary":"Create a style profile","security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"16 to 128 chars of [A-Za-z0-9_.:-]","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StyleCreateRequest"}}}},"responses":{"201":{"description":"HTTP 201","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Style"}}}},"401":{"description":"UNAUTHENTICATED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"PLAN_REQUIRED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"STYLE_LIMIT_REACHED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"VALIDATION_ERROR, STYLE_SAMPLE_TOO_SHORT, STYLE_SAMPLE_TOO_LONG, UNSUPPORTED_LANGUAGE, IDEMPOTENCY_CONFLICT","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"INTERNAL_ERROR","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/styles/{id}":{"get":{"operationId":"getStyle","summary":"Read one style with its sample","security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"HTTP 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Style"}}}},"401":{"description":"UNAUTHENTICATED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"STYLE_NOT_FOUND","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"INTERNAL_ERROR","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"put":{"operationId":"updateStyle","summary":"Replace name and/or sample, or request style replication","security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StyleUpdateRequest"}}}},"responses":{"200":{"description":"HTTP 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Style"}}}},"401":{"description":"UNAUTHENTICATED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"PLAN_REQUIRED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"STYLE_NOT_FOUND","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"VALIDATION_ERROR, STYLE_SAMPLE_TOO_SHORT, STYLE_SAMPLE_TOO_LONG, UNSUPPORTED_LANGUAGE","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"INTERNAL_ERROR","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"deleteStyle","summary":"Soft-delete a style","security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Deleted"},"401":{"description":"UNAUTHENTICATED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"STYLE_NOT_FOUND","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"INTERNAL_ERROR","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/uploads/extract":{"post":{"operationId":"extractUploadText","summary":"Extract the text of a .txt or .docx file, and a .docx's Markdown (Standard and Premium)","security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","required":["file"],"properties":{"file":{"type":"string","format":"binary"}}}}}},"responses":{"200":{"description":"HTTP 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExtractedText"}}}},"401":{"description":"UNAUTHENTICATED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"PLAN_REQUIRED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"FILE_TOO_LARGE","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"FILE_TYPE_UNSUPPORTED, UNSUPPORTED_MEDIA_TYPE","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"VALIDATION_ERROR, FILE_UNREADABLE, FILE_NO_TEXT","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"INTERNAL_ERROR","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/me":{"get":{"operationId":"getMe","summary":"Current user, plan, limits, features","security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[],"responses":{"200":{"description":"HTTP 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Me"}}}},"401":{"description":"UNAUTHENTICATED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"INTERNAL_ERROR","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"updateMe","summary":"Update profile settings","security":[{"cookieAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MePatchRequest"}}}},"responses":{"200":{"description":"HTTP 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Me"}}}},"401":{"description":"UNAUTHENTICATED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"VALIDATION_ERROR","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"INTERNAL_ERROR","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"deleteMe","summary":"Schedule account deletion","security":[{"cookieAuth":[]}],"parameters":[],"responses":{"202":{"description":"Deletion scheduled"},"400":{"description":"MAGIC_LINK_INVALID","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"RECENT_AUTH_REQUIRED, UNAUTHENTICATED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"INTERNAL_ERROR","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/me/delete/request":{"post":{"operationId":"requestDeletion","summary":"Email the deletion confirmation link","security":[{"cookieAuth":[]}],"parameters":[],"responses":{"202":{"description":"Link sent"},"401":{"description":"RECENT_AUTH_REQUIRED, UNAUTHENTICATED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"INTERNAL_ERROR","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"EMAIL_SEND_FAILED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/me/undelete":{"post":{"operationId":"undeleteMe","summary":"Cancel a scheduled deletion","security":[{"cookieAuth":[]}],"parameters":[],"responses":{"200":{"description":"HTTP 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Me"}}}},"401":{"description":"UNAUTHENTICATED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"INTERNAL_ERROR","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/me/email":{"post":{"operationId":"changeEmail","summary":"Start an email change","security":[{"cookieAuth":[]}],"parameters":[],"responses":{"202":{"description":"Link sent"},"401":{"description":"RECENT_AUTH_REQUIRED, UNAUTHENTICATED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"EMAIL_DOMAIN_BLOCKED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"EMAIL_IN_USE","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"INVALID_EMAIL","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"INTERNAL_ERROR","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/me/sessions":{"get":{"operationId":"listSessions","summary":"List sessions","security":[{"cookieAuth":[]}],"parameters":[{"name":"limit","in":"query","required":false,"description":"1 to 100, default 20","schema":{"type":"string"}},{"name":"cursor","in":"query","required":false,"description":"Opaque cursor from a previous next_cursor","schema":{"type":"string"}}],"responses":{"200":{"description":"HTTP 200","content":{"application/json":{"schema":{"type":"object","required":["data","next_cursor","has_more"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/SessionInfo"}},"next_cursor":{"type":["string","null"]},"has_more":{"type":"boolean"}}}}}},"401":{"description":"UNAUTHENTICATED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"INTERNAL_ERROR","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/me/sessions/{id}":{"delete":{"operationId":"revokeSession","summary":"Revoke one session","security":[{"cookieAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"HTTP 204"},"401":{"description":"UNAUTHENTICATED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"NOT_FOUND","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"INTERNAL_ERROR","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/me/identities/{provider}":{"delete":{"operationId":"unlinkIdentity","summary":"Remove magic_link or password (never the last)","security":[{"cookieAuth":[]}],"parameters":[{"name":"provider","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"HTTP 204"},"401":{"description":"RECENT_AUTH_REQUIRED, UNAUTHENTICATED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"NOT_FOUND","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"VALIDATION_ERROR","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"INTERNAL_ERROR","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/usage":{"get":{"operationId":"getUsage","summary":"Word usage and ledger for a period","security":[{"bearerAuth":[]},{"cookieAuth":[]}],"parameters":[{"name":"period","in":"query","required":false,"description":"current, previous or YYYY-MM","schema":{"type":"string"}},{"name":"group_by","in":"query","required":false,"description":"day for daily rows","schema":{"type":"string"}},{"name":"api_key_id","in":"query","required":false,"description":"Restrict api counts to one of your keys (another id is 404)","schema":{"type":"string"}},{"name":"cursor","in":"query","required":false,"description":"Opaque cursor from a previous next_cursor","schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"description":"1 to 100, default 20","schema":{"type":"string"}}],"responses":{"200":{"description":"HTTP 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Usage"}}}},"401":{"description":"UNAUTHENTICATED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"NOT_FOUND","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"VALIDATION_ERROR","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"INTERNAL_ERROR","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/billing/checkout":{"post":{"operationId":"createCheckout","summary":"Create a Stripe Checkout session","security":[{"cookieAuth":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"16 to 128 chars of [A-Za-z0-9_.:-]","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutRequest"}}}},"responses":{"200":{"description":"Checkout URL"},"401":{"description":"UNAUTHENTICATED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"ALREADY_SUBSCRIBED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"GONE","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"VALIDATION_ERROR","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"RATE_LIMITED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"INTERNAL_ERROR","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"BILLING_UNAVAILABLE","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"BILLING_NOT_CONFIGURED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/billing/portal":{"post":{"operationId":"createPortal","summary":"Create a Stripe billing portal session","security":[{"cookieAuth":[]}],"parameters":[],"responses":{"200":{"description":"Portal URL"},"401":{"description":"UNAUTHENTICATED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"NOT_FOUND","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"RATE_LIMITED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"INTERNAL_ERROR","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"BILLING_UNAVAILABLE","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"BILLING_NOT_CONFIGURED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api-keys":{"get":{"operationId":"listApiKeys","summary":"List API keys","security":[{"cookieAuth":[]}],"parameters":[],"responses":{"200":{"description":"HTTP 200","content":{"application/json":{"schema":{"type":"object","required":["data","next_cursor","has_more"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ApiKey"}},"next_cursor":{"type":["string","null"]},"has_more":{"type":"boolean"}}}}}},"401":{"description":"UNAUTHENTICATED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"PLAN_REQUIRED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"INTERNAL_ERROR","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"createApiKey","summary":"Create an API key (shown once)","security":[{"cookieAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyCreateRequest"}}}},"responses":{"201":{"description":"HTTP 201","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyCreated"}}}},"401":{"description":"RECENT_AUTH_REQUIRED, UNAUTHENTICATED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"PLAN_REQUIRED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"API_KEY_LIMIT_REACHED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"INTERNAL_ERROR","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api-keys/{id}":{"delete":{"operationId":"revokeApiKey","summary":"Revoke an API key","security":[{"cookieAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Revoked"},"401":{"description":"UNAUTHENTICATED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"NOT_FOUND","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"INTERNAL_ERROR","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/auth/magic-link":{"post":{"operationId":"requestMagicLink","summary":"Email a sign-in link","security":[],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MagicLinkRequest"}}}},"responses":{"200":{"description":"Link sent"},"403":{"description":"TURNSTILE_FAILED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"VALIDATION_ERROR","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"RATE_LIMITED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"INTERNAL_ERROR","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"EMAIL_SEND_FAILED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/auth/magic-link/verify":{"post":{"operationId":"verifyMagicLink","summary":"Redeem a sign-in link","security":[],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MagicLinkVerifyRequest"}}}},"responses":{"200":{"description":"Signed in, or the purpose result"},"400":{"description":"MAGIC_LINK_INVALID","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"MAGIC_LINK_USED, EMAIL_IN_USE","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"MAGIC_LINK_EXPIRED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"RATE_LIMITED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"INTERNAL_ERROR","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"SIGNUPS_PAUSED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/auth/password/signup":{"post":{"operationId":"passwordSignup","summary":"Start an email + password signup (emails a verification link; 200 unless sign-ups are paused)","security":[],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PasswordSignupRequest"}}}},"responses":{"200":{"description":"Verification email sent when appropriate"},"403":{"description":"TURNSTILE_FAILED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"VALIDATION_ERROR","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"RATE_LIMITED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"INTERNAL_ERROR","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"EMAIL_SEND_FAILED, SIGNUPS_PAUSED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/auth/password/verify-email":{"post":{"operationId":"passwordVerifyEmail","summary":"Confirm the address, create the account and sign in","security":[],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailVerifyRequest"}}}},"responses":{"200":{"description":"Signed in"},"400":{"description":"AUTH_TOKEN_INVALID","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"AUTH_TOKEN_USED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"AUTH_TOKEN_EXPIRED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"RATE_LIMITED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"INTERNAL_ERROR","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"SIGNUPS_PAUSED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/auth/password/login":{"post":{"operationId":"passwordLogin","summary":"Sign in with email and password","security":[],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PasswordLoginRequest"}}}},"responses":{"200":{"description":"Signed in"},"401":{"description":"INVALID_CREDENTIALS","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"TURNSTILE_FAILED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"ACCOUNT_LOCKED, RATE_LIMITED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"INTERNAL_ERROR","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/auth/password/forgot":{"post":{"operationId":"passwordForgot","summary":"Email a password reset link (always 200)","security":[],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PasswordForgotRequest"}}}},"responses":{"200":{"description":"Accepted"},"403":{"description":"TURNSTILE_FAILED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"VALIDATION_ERROR","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"RATE_LIMITED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"INTERNAL_ERROR","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/auth/password/reset":{"post":{"operationId":"passwordReset","summary":"Set a new password with a reset link; signs out every session","security":[],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PasswordResetRequest"}}}},"responses":{"200":{"description":"Password reset"},"400":{"description":"AUTH_TOKEN_INVALID","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"TURNSTILE_FAILED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"AUTH_TOKEN_USED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"AUTH_TOKEN_EXPIRED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"VALIDATION_ERROR","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"INTERNAL_ERROR","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/auth/password/change":{"post":{"operationId":"passwordChange","summary":"Set or change the password of the signed-in account","security":[{"cookieAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PasswordChangeRequest"}}}},"responses":{"200":{"description":"Password saved; other sessions revoked"},"401":{"description":"UNAUTHENTICATED, RECENT_AUTH_REQUIRED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"VALIDATION_ERROR","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"ACCOUNT_LOCKED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"INTERNAL_ERROR","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/auth/logout":{"post":{"operationId":"logout","summary":"Sign out this session","security":[],"parameters":[],"responses":{"204":{"description":"HTTP 204"},"500":{"description":"INTERNAL_ERROR","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/auth/logout-all":{"post":{"operationId":"logoutAll","summary":"Sign out every session","security":[{"cookieAuth":[]}],"parameters":[],"responses":{"200":{"description":"Signed out elsewhere"},"401":{"description":"UNAUTHENTICATED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"INTERNAL_ERROR","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/contact":{"post":{"operationId":"sendContact","summary":"Contact form","security":[],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactRequest"}}}},"responses":{"202":{"description":"Received"},"403":{"description":"TURNSTILE_FAILED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"VALIDATION_ERROR","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"RATE_LIMITED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"INTERNAL_ERROR","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"EMAIL_SEND_FAILED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/telemetry":{"post":{"operationId":"sendTelemetry","summary":"Client funnel events (text/plain JSON beacon)","security":[{"cookieAuth":[]}],"parameters":[],"responses":{"204":{"description":"HTTP 204"},"401":{"description":"UNAUTHENTICATED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"PAYLOAD_TOO_LARGE","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"INTERNAL_ERROR","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/config":{"get":{"operationId":"publicConfig","summary":"Public runtime configuration: environment, Turnstile site key, feature switches, banner","security":[],"parameters":[],"responses":{"200":{"description":"HTTP 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicConfig"}}}},"500":{"description":"INTERNAL_ERROR","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/health":{"get":{"operationId":"health","summary":"Service health; `probe` is th-probe-ok while D1 answers and no cron heartbeat is stale","security":[],"parameters":[],"responses":{"200":{"description":"HTTP 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Health"}}}},"500":{"description":"INTERNAL_ERROR","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/openapi.json":{"get":{"operationId":"openapi","summary":"This document","security":[],"parameters":[],"responses":{"200":{"description":"OpenAPI 3.1 document"},"500":{"description":"INTERNAL_ERROR","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/public/eval-readout":{"get":{"operationId":"evalReadout","summary":"Published Turnitin panel readout","security":[],"parameters":[],"responses":{"200":{"description":"HTTP 200","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvalReadout"}}}},"500":{"description":"INTERNAL_ERROR","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"th_live_ followed by 32 characters (Premium)"},"cookieAuth":{"type":"apiKey","in":"cookie","name":"th_session"}},"schemas":{"JobCreateRequest":{"type":"object","properties":{"text":{"description":"The text to humanize: plain text, or Markdown when input_format is markdown.","type":"string","minLength":1},"input_format":{"description":"plain (default) or markdown. Markdown keeps headings, bullet and numbered lists, block quotes, fenced code, links (http, https and mailto), bold and italic in the result; anything else is read as plain text, and only the prose is humanized. Word counts and billing use the text without Markdown syntax or link URLs. options.locked_ranges must be empty with markdown.","type":"string","enum":["plain","markdown"]},"title":{"anyOf":[{"type":"string","minLength":1,"maxLength":120},{"type":"null"}]},"preset":{"type":"string","enum":["academic_essay","academic_report","article_blog","marketing","business","story","cover_letter","legal","general"]},"strategy":{"description":"humanize_only (default) or style_replicate_humanized. The retired rewrite_then_humanize and rewrite_only are accepted and run as humanize_only.","anyOf":[{"type":"string","enum":["humanize_only","style_replicate_humanized"]},{"type":"string","enum":["rewrite_then_humanize","rewrite_only"]}]},"style_id":{"description":"Required for style_replicate_humanized; ignored, and not stored, with any other strategy.","anyOf":[{"type":"string","pattern":"^[0-9A-HJKMNP-TV-Z]{26}$"},{"type":"null"}]},"language":{"type":"string","const":"auto"},"options":{"type":"object","properties":{"readability":{"anyOf":[{"type":"string","enum":["High School","University","Doctorate","Journalist","Marketing"]},{"type":"null"}]},"purpose":{"anyOf":[{"type":"string","enum":["General Writing","Essay","Article","Marketing Material","Story","Cover Letter","Report","Business Material","Legal Material"]},{"type":"null"}]},"strength":{"anyOf":[{"type":"string","enum":["Quality","Balanced","More Human"]},{"type":"null"}]},"prompt_variant":{"description":"Retired. Accepted so older clients keep working, and ignored: no prompt runs since DL-94.","anyOf":[{"type":"string","enum":["academic","editorial","neutral"]},{"type":"null"}]},"protected_terms":{"maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":60}},"locked_ranges":{"maxItems":50,"type":"array","items":{"type":"object","properties":{"start":{"type":"integer","minimum":0,"maximum":9007199254740991},"end":{"type":"integer","minimum":1,"maximum":9007199254740991}},"required":["start","end"]}},"allow_dashes_from_sample":{"type":"boolean"},"skip_mechanical_fix":{"type":"boolean"},"baseline_detect":{"anyOf":[{"type":"boolean"},{"type":"null"}]}},"additionalProperties":false},"turnstile_token":{"anyOf":[{"type":"string"},{"type":"null"}]},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["text"],"additionalProperties":false},"RehumanizeRequest":{"type":"object","properties":{"options":{"type":"object","properties":{"strength":{"type":"string","enum":["Quality","Balanced","More Human"]},"readability":{"anyOf":[{"type":"string","enum":["High School","University","Doctorate","Journalist","Marketing"]},{"type":"null"}]},"purpose":{"anyOf":[{"type":"string","enum":["General Writing","Essay","Article","Marketing Material","Story","Cover Letter","Report","Business Material","Legal Material"]},{"type":"null"}]}},"additionalProperties":false},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"additionalProperties":false},"DetectRequest":{"type":"object","properties":{"text":{"type":"string","minLength":1},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["text"],"additionalProperties":false},"StyleCreateRequest":{"type":"object","properties":{"name":{"type":"string","minLength":3,"maxLength":60},"sample":{"type":"string","minLength":1},"replicate_upstream":{"type":"boolean"}},"required":["name","sample"],"additionalProperties":false},"StyleUpdateRequest":{"type":"object","properties":{"name":{"type":"string","minLength":3,"maxLength":60},"sample":{"type":"string","minLength":1},"replicate_upstream":{"type":"boolean"}},"additionalProperties":false},"MePatchRequest":{"type":"object","properties":{"display_name":{"anyOf":[{"type":"string","minLength":1,"maxLength":80},{"type":"null"}]},"text_retention_days":{"anyOf":[{"type":"number","const":0},{"type":"number","const":7},{"type":"number","const":30}]}},"additionalProperties":false},"ApiKeyCreateRequest":{"type":"object","properties":{"name":{"type":"string","minLength":3,"maxLength":40}},"required":["name"],"additionalProperties":false},"CheckoutRequest":{"type":"object","properties":{"plan":{"type":"string","enum":["basic","standard","premium"]},"interval":{"type":"string","enum":["month","year"]},"coupon":{"type":"string","minLength":3,"maxLength":32,"pattern":"^[A-Z0-9_-]+$"},"success_path":{"type":"string","maxLength":256,"pattern":"^\\/(?!\\/)[a-zA-Z0-9/_?=&%-]*$"},"cancel_path":{"type":"string","maxLength":256,"pattern":"^\\/(?!\\/)[a-zA-Z0-9/_?=&%-]*$"},"welcome_offer":{"description":"True when the button showed the welcome back offer ($1 first month of Basic monthly). Without the offer the answer is 410 GONE with details.reason welcome_offer_unavailable, never a Checkout at the full price.","type":"boolean"}},"required":["plan","interval"],"additionalProperties":false},"MagicLinkRequest":{"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-z]{2,}$"},"turnstile_token":{"type":"string","minLength":1},"redirect_path":{"type":"string","maxLength":256},"plan":{"type":"string","enum":["basic","standard","premium"]},"interval":{"type":"string","enum":["month","year"]},"coupon":{"type":"string","maxLength":32}},"required":["email","turnstile_token"],"additionalProperties":false},"MagicLinkVerifyRequest":{"type":"object","properties":{"token":{"type":"string","minLength":20}},"required":["token"],"additionalProperties":false},"PasswordSignupRequest":{"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-z]{2,}$"},"password":{"type":"string","minLength":10,"maxLength":128},"turnstile_token":{"type":"string","minLength":1},"redirect_path":{"type":"string","maxLength":256},"plan":{"type":"string","enum":["basic","standard","premium"]},"interval":{"type":"string","enum":["month","year"]},"coupon":{"type":"string","maxLength":32}},"required":["email","password","turnstile_token"],"additionalProperties":false},"EmailVerifyRequest":{"type":"object","properties":{"token":{"type":"string","minLength":20}},"required":["token"],"additionalProperties":false},"PasswordLoginRequest":{"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-z]{2,}$"},"password":{"type":"string","minLength":1,"maxLength":128},"turnstile_token":{"type":"string","minLength":1},"redirect_path":{"type":"string","maxLength":256}},"required":["email","password","turnstile_token"],"additionalProperties":false},"PasswordForgotRequest":{"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-z]{2,}$"},"turnstile_token":{"type":"string","minLength":1}},"required":["email","turnstile_token"],"additionalProperties":false},"PasswordResetRequest":{"type":"object","properties":{"token":{"type":"string","minLength":20},"password":{"type":"string","minLength":10,"maxLength":128},"turnstile_token":{"type":"string","minLength":1}},"required":["token","password","turnstile_token"],"additionalProperties":false},"PasswordChangeRequest":{"type":"object","properties":{"current_password":{"type":"string","minLength":1,"maxLength":128},"new_password":{"type":"string","minLength":10,"maxLength":128}},"required":["new_password"],"additionalProperties":false},"ContactRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"email":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"message":{"type":"string","minLength":10,"maxLength":4000},"turnstile_token":{"type":"string","minLength":1}},"required":["name","email","message","turnstile_token"],"additionalProperties":false},"Job":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string","const":"job"},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string","enum":["queued","preprocessing","rewriting","humanizing","checking","retrying","done","failed","cancelled"]},"stage":{"anyOf":[{"type":"string","enum":["s0_normalize","s1_mechanical_fix","s4_undetectable_humanize","s5_detector_check","s6_fidelity_check","s7_finalize","s2_llm_rewrite","s3_slop_gate"]},{"type":"null"}]},"preset":{"type":"string","enum":["academic_essay","academic_report","article_blog","marketing","business","story","cover_letter","legal","general"]},"strategy":{"type":"string","enum":["humanize_only","style_replicate_humanized","rewrite_then_humanize","rewrite_only"]},"strategy_effective":{"anyOf":[{"type":"string","enum":["humanize_only","style_replicate_humanized","rewrite_then_humanize","rewrite_only"]},{"type":"null"}]},"style_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"language":{"type":"string"},"options":{"type":"object","properties":{"readability":{"type":"string","enum":["High School","University","Doctorate","Journalist","Marketing"]},"purpose":{"type":"string","enum":["General Writing","Essay","Article","Marketing Material","Story","Cover Letter","Report","Business Material","Legal Material"]},"strength":{"type":"string","enum":["Quality","Balanced","More Human"]},"protected_terms":{"type":"array","items":{"type":"string"}},"locked_ranges":{"type":"array","items":{"type":"object","properties":{"start":{"type":"integer","minimum":0,"maximum":9007199254740991},"end":{"type":"integer","minimum":1,"maximum":9007199254740991}},"required":["start","end"],"additionalProperties":false}},"allow_dashes_from_sample":{"type":"boolean"},"skip_mechanical_fix":{"type":"boolean"},"baseline_detect":{"type":"boolean"}},"required":["readability","purpose","strength","protected_terms","locked_ranges","allow_dashes_from_sample","skip_mechanical_fix","baseline_detect"],"additionalProperties":false},"input":{"type":"object","properties":{"word_count":{"type":"number"},"billed_words":{"type":"number"},"refunded_words":{"type":"number"},"sha256":{"type":"string"},"preview":{"anyOf":[{"type":"string"},{"type":"null"}]},"text":{"description":"The text as plain text: for a markdown job, the Markdown without its syntax or link URLs.","anyOf":[{"type":"string"},{"type":"null"}]},"format":{"description":"How the text was sent: plain or markdown.","type":"string","enum":["plain","markdown"]},"markdown":{"description":"The text as sent, for a markdown job; null for a plain job.","anyOf":[{"type":"string"},{"type":"null"}]}},"required":["word_count","billed_words","refunded_words","sha256","preview"],"additionalProperties":false},"output":{"anyOf":[{"type":"object","properties":{"text":{"description":"The result as plain text: for a markdown job, the result without Markdown syntax or link URLs.","anyOf":[{"type":"string"},{"type":"null"}]},"format":{"description":"The job's input_format: markdown when output.markdown is set.","type":"string","enum":["plain","markdown"]},"markdown":{"description":"The result as Markdown with the input's headings, lists, quotes, code, links, bold and italic, for a markdown job; null for a plain job.","anyOf":[{"type":"string"},{"type":"null"}]},"word_count":{"anyOf":[{"type":"number"},{"type":"null"}]},"style_score":{"anyOf":[{"type":"object","properties":{"before":{"anyOf":[{"type":"number"},{"type":"null"}]},"after":{"anyOf":[{"type":"number"},{"type":"null"}]},"badge":{"anyOf":[{"type":"string"},{"type":"null"}]},"rules_version":{"anyOf":[{"type":"string"},{"type":"null"}]},"scorer_version":{"anyOf":[{"type":"string"},{"type":"null"}]},"fixer_version":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["before","after","badge","rules_version","scorer_version","fixer_version"],"additionalProperties":false},{"type":"null"}]},"readability":{"anyOf":[{"type":"object","properties":{"before":{"type":"object","properties":{"gunning_fog":{"type":"number"},"mean_sentence_length":{"type":"number"},"burstiness":{"type":"number"},"type_token_ratio":{"type":"number"}},"required":["gunning_fog","mean_sentence_length","burstiness","type_token_ratio"],"additionalProperties":false},"after":{"type":"object","properties":{"gunning_fog":{"type":"number"},"mean_sentence_length":{"type":"number"},"burstiness":{"type":"number"},"type_token_ratio":{"type":"number"}},"required":["gunning_fog","mean_sentence_length","burstiness","type_token_ratio"],"additionalProperties":false}},"required":["before","after"],"additionalProperties":false},{"type":"null"}]},"replacements":{"type":"array","items":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"},"source":{"type":"string","enum":["mechanical","llm"]}},"required":["from","to","source"],"additionalProperties":false}},"protected_spans":{"type":"number"},"citations_preserved":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["text","word_count","style_score","readability","replacements","protected_spans","citations_preserved"],"additionalProperties":false},{"type":"null"}]},"detector":{"anyOf":[{"type":"object","properties":{"provider":{"type":"string","const":"undetectable"},"model":{"type":"string"},"baseline":{"anyOf":[{"type":"object","properties":{"result":{"type":"number"},"label":{"type":"string","enum":["human","possible_ai","ai"]},"checked_at":{"type":"string"},"confidence":{"type":"string","enum":["high","medium","low"]},"details":{"type":"object","properties":{"scoreGptZero":{"type":"number"},"scoreOpenAI":{"type":"number"},"scoreWriter":{"type":"number"},"scoreCrossPlag":{"type":"number"},"scoreCopyLeaks":{"type":"number"},"scoreSapling":{"type":"number"},"scoreContentAtScale":{"type":"number"},"scoreZeroGPT":{"type":"number"},"human":{"type":"number"}},"additionalProperties":{}}},"required":["result","label","checked_at"],"additionalProperties":false},{"type":"null"}]},"final":{"anyOf":[{"type":"object","properties":{"result":{"type":"number"},"label":{"type":"string","enum":["human","possible_ai","ai"]},"checked_at":{"type":"string"},"confidence":{"type":"string","enum":["high","medium","low"]},"details":{"type":"object","properties":{"scoreGptZero":{"type":"number"},"scoreOpenAI":{"type":"number"},"scoreWriter":{"type":"number"},"scoreCrossPlag":{"type":"number"},"scoreCopyLeaks":{"type":"number"},"scoreSapling":{"type":"number"},"scoreContentAtScale":{"type":"number"},"scoreZeroGPT":{"type":"number"},"human":{"type":"number"}},"additionalProperties":{}}},"required":["result","label","checked_at"],"additionalProperties":false},{"type":"null"}]}},"required":["provider","model","baseline","final"],"additionalProperties":false},{"type":"null"}]},"fidelity":{"anyOf":[{"type":"object","properties":{"status":{"description":"ok: nothing found. review: see review_items. skipped: no humanized text was checked.","type":"string","enum":["ok","review","skipped"]},"document_cosine":{"anyOf":[{"type":"number"},{"type":"null"}]},"min_paragraph_cosine":{"anyOf":[{"type":"number"},{"type":"null"}]},"skeleton_preserved_ratio":{"anyOf":[{"type":"number"},{"type":"null"}]},"review_items":{"description":"At most 20 notes, the most concrete first.","type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["number_changed","number_added","number_dropped","name_added","protected_term_changed","locked_text_changed","code_changed","link_added","link_dropped","link_moved","link_text_changed","citation_added","citation_dropped","quote_changed","claim_added","example_added","paragraph_dropped","length_changed","meaning_drift","sample_wording"]},"before":{"description":"The words of your text, or null for something the result adds.","anyOf":[{"type":"string"},{"type":"null"}]},"after":{"description":"The words of the result, or null for something it leaves out.","anyOf":[{"type":"string"},{"type":"null"}]},"message":{"description":"One plain line, for example: Number changed: \"almost two hundred dollars\" became \"$190\".","type":"string"}},"required":["kind","before","after","message"],"additionalProperties":false}}},"required":["status","document_cosine","min_paragraph_cosine","skeleton_preserved_ratio","review_items"],"additionalProperties":false},{"type":"null"}]},"warnings":{"type":"array","items":{"type":"string"}},"attempts":{"type":"object","properties":{"humanize_attempts":{"type":"number"},"detector_checks":{"type":"number"}},"required":["humanize_attempts","detector_checks"],"additionalProperties":false},"failure":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"stage":{"anyOf":[{"type":"string"},{"type":"null"}]},"refunded_words":{"type":"number"}},"required":["code","message","stage","refunded_words"],"additionalProperties":false},{"type":"null"}]},"billing_mode":{"type":"string","enum":["platform"]},"parent_job_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"root_job_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"rehumanize_seq":{"anyOf":[{"type":"number"},{"type":"null"}]},"rehumanize_count":{"type":"number"},"wait_reason":{"anyOf":[{"type":"string","enum":["capacity","llm_retry","humanizer_retry","humanizer_unavailable"]},{"type":"null"}]},"upstream_submitted_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"source":{"type":"string","enum":["app","api","demo","eval","admin"]},"api_key_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"created_at":{"type":"string"},"started_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"completed_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"expires_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"history_expires_at":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","object","title","status","stage","preset","strategy","strategy_effective","style_id","language","options","input","output","detector","fidelity","warnings","attempts","failure","billing_mode","parent_job_id","root_job_id","rehumanize_seq","rehumanize_count","wait_reason","upstream_submitted_at","source","api_key_id","metadata","created_at","started_at","completed_at","expires_at","history_expires_at"],"additionalProperties":false},"JobSummary":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string","const":"job"},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string","enum":["queued","preprocessing","rewriting","humanizing","checking","retrying","done","failed","cancelled"]},"stage":{"anyOf":[{"type":"string","enum":["s0_normalize","s1_mechanical_fix","s4_undetectable_humanize","s5_detector_check","s6_fidelity_check","s7_finalize","s2_llm_rewrite","s3_slop_gate"]},{"type":"null"}]},"preset":{"type":"string","enum":["academic_essay","academic_report","article_blog","marketing","business","story","cover_letter","legal","general"]},"strategy":{"type":"string","enum":["humanize_only","style_replicate_humanized","rewrite_then_humanize","rewrite_only"]},"strategy_effective":{"anyOf":[{"type":"string","enum":["humanize_only","style_replicate_humanized","rewrite_then_humanize","rewrite_only"]},{"type":"null"}]},"style_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"language":{"type":"string"},"input":{"type":"object","properties":{"word_count":{"type":"number"},"billed_words":{"type":"number"},"refunded_words":{"type":"number"},"sha256":{"type":"string"},"preview":{"anyOf":[{"type":"string"},{"type":"null"}]},"format":{"description":"How the text was sent: plain or markdown.","type":"string","enum":["plain","markdown"]}},"required":["word_count","billed_words","refunded_words","sha256","preview"],"additionalProperties":false},"output":{"anyOf":[{"type":"object","properties":{"format":{"description":"The job's input_format: markdown when output.markdown is set.","type":"string","enum":["plain","markdown"]},"word_count":{"anyOf":[{"type":"number"},{"type":"null"}]},"style_score":{"anyOf":[{"type":"object","properties":{"before":{"anyOf":[{"type":"number"},{"type":"null"}]},"after":{"anyOf":[{"type":"number"},{"type":"null"}]},"badge":{"anyOf":[{"type":"string"},{"type":"null"}]},"rules_version":{"anyOf":[{"type":"string"},{"type":"null"}]},"scorer_version":{"anyOf":[{"type":"string"},{"type":"null"}]},"fixer_version":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["before","after","badge","rules_version","scorer_version","fixer_version"],"additionalProperties":false},{"type":"null"}]},"readability":{"anyOf":[{"type":"object","properties":{"before":{"type":"object","properties":{"gunning_fog":{"type":"number"},"mean_sentence_length":{"type":"number"},"burstiness":{"type":"number"},"type_token_ratio":{"type":"number"}},"required":["gunning_fog","mean_sentence_length","burstiness","type_token_ratio"],"additionalProperties":false},"after":{"type":"object","properties":{"gunning_fog":{"type":"number"},"mean_sentence_length":{"type":"number"},"burstiness":{"type":"number"},"type_token_ratio":{"type":"number"}},"required":["gunning_fog","mean_sentence_length","burstiness","type_token_ratio"],"additionalProperties":false}},"required":["before","after"],"additionalProperties":false},{"type":"null"}]},"protected_spans":{"type":"number"},"citations_preserved":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["word_count","style_score","readability","protected_spans","citations_preserved"],"additionalProperties":false},{"type":"null"}]},"detector":{"anyOf":[{"type":"object","properties":{"provider":{"type":"string","const":"undetectable"},"model":{"type":"string"},"baseline":{"anyOf":[{"type":"object","properties":{"result":{"type":"number"},"label":{"type":"string","enum":["human","possible_ai","ai"]},"checked_at":{"type":"string"},"confidence":{"type":"string","enum":["high","medium","low"]}},"required":["result","label","checked_at"],"additionalProperties":false},{"type":"null"}]},"final":{"anyOf":[{"type":"object","properties":{"result":{"type":"number"},"label":{"type":"string","enum":["human","possible_ai","ai"]},"checked_at":{"type":"string"},"confidence":{"type":"string","enum":["high","medium","low"]}},"required":["result","label","checked_at"],"additionalProperties":false},{"type":"null"}]}},"required":["provider","model","baseline","final"],"additionalProperties":false},{"type":"null"}]},"warnings":{"type":"array","items":{"type":"string"}},"attempts":{"type":"object","properties":{"humanize_attempts":{"type":"number"},"detector_checks":{"type":"number"}},"required":["humanize_attempts","detector_checks"],"additionalProperties":false},"failure":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"stage":{"anyOf":[{"type":"string"},{"type":"null"}]},"refunded_words":{"type":"number"}},"required":["code","message","stage","refunded_words"],"additionalProperties":false},{"type":"null"}]},"billing_mode":{"type":"string","enum":["platform"]},"parent_job_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"root_job_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"rehumanize_seq":{"anyOf":[{"type":"number"},{"type":"null"}]},"rehumanize_count":{"type":"number"},"wait_reason":{"anyOf":[{"type":"string","enum":["capacity","llm_retry","humanizer_retry","humanizer_unavailable"]},{"type":"null"}]},"upstream_submitted_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"source":{"type":"string","enum":["app","api","demo","eval","admin"]},"api_key_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"created_at":{"type":"string"},"started_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"completed_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"expires_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"history_expires_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"options":{"anyOf":[{"type":"object","properties":{"readability":{"type":"string","enum":["High School","University","Doctorate","Journalist","Marketing"]},"purpose":{"type":"string","enum":["General Writing","Essay","Article","Marketing Material","Story","Cover Letter","Report","Business Material","Legal Material"]},"strength":{"type":"string","enum":["Quality","Balanced","More Human"]},"protected_terms":{"type":"array","items":{"type":"string"}},"allow_dashes_from_sample":{"type":"boolean"},"skip_mechanical_fix":{"type":"boolean"},"baseline_detect":{"type":"boolean"}},"required":["readability","purpose","strength","protected_terms","allow_dashes_from_sample","skip_mechanical_fix","baseline_detect"],"additionalProperties":false},{"type":"null"}]}},"required":["id","object","title","status","stage","preset","strategy","strategy_effective","style_id","language","input","output","detector","warnings","attempts","failure","billing_mode","parent_job_id","root_job_id","rehumanize_seq","rehumanize_count","wait_reason","upstream_submitted_at","source","api_key_id","metadata","created_at","started_at","completed_at","expires_at","history_expires_at"],"additionalProperties":false},"JobCreated":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string","const":"job"},"status":{"type":"string","enum":["queued","preprocessing","rewriting","humanizing","checking","retrying","done","failed","cancelled"]},"stage":{"anyOf":[{"type":"string","enum":["s0_normalize","s1_mechanical_fix","s4_undetectable_humanize","s5_detector_check","s6_fidelity_check","s7_finalize","s2_llm_rewrite","s3_slop_gate"]},{"type":"null"}]},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"preset":{"type":"string","enum":["academic_essay","academic_report","article_blog","marketing","business","story","cover_letter","legal","general"]},"strategy":{"type":"string","enum":["humanize_only","style_replicate_humanized","rewrite_then_humanize","rewrite_only"]},"input":{"type":"object","properties":{"word_count":{"type":"number"},"billed_words":{"type":"number"},"refunded_words":{"type":"number"},"sha256":{"type":"string"},"preview":{"anyOf":[{"type":"string"},{"type":"null"}]},"format":{"description":"How the text was sent: plain or markdown.","type":"string","enum":["plain","markdown"]}},"required":["word_count","billed_words","refunded_words","sha256","preview"],"additionalProperties":false},"billing_mode":{"type":"string","enum":["platform"]},"links":{"type":"object","properties":{"self":{"type":"string"},"events":{"type":"string"}},"required":["self","events"],"additionalProperties":false},"created_at":{"type":"string"}},"required":["id","object","status","stage","title","preset","strategy","input","billing_mode","links","created_at"],"additionalProperties":false},"JobStatusEvent":{"type":"object","properties":{"job_id":{"type":"string"},"status":{"type":"string","enum":["queued","preprocessing","rewriting","humanizing","checking","retrying","done","failed","cancelled"]},"stage":{"anyOf":[{"type":"string","enum":["s0_normalize","s1_mechanical_fix","s4_undetectable_humanize","s5_detector_check","s6_fidelity_check","s7_finalize","s2_llm_rewrite","s3_slop_gate"]},{"type":"null"}]},"wait_reason":{"anyOf":[{"type":"string","enum":["capacity","llm_retry","humanizer_retry","humanizer_unavailable"]},{"type":"null"}]},"at":{"type":"string"}},"required":["job_id","status","stage","at"],"additionalProperties":false},"JobProgressEvent":{"type":"object","properties":{"job_id":{"type":"string"},"stage":{"anyOf":[{"type":"string","enum":["s0_normalize","s1_mechanical_fix","s4_undetectable_humanize","s5_detector_check","s6_fidelity_check","s7_finalize","s2_llm_rewrite","s3_slop_gate"]},{"type":"null"}]},"step_index":{"type":"number"},"steps_total":{"type":"number"},"percent":{"type":"number"},"attempt":{"type":"number"},"pass":{"anyOf":[{"type":"number"},{"type":"null"}]},"message":{"type":"string"},"detail":{"anyOf":[{"type":"object","properties":{"warning":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"chunk":{"type":"object","properties":{"index":{"type":"number"},"total":{"type":"number"}},"required":["index","total"],"additionalProperties":false},"queue_wait_ms":{"type":"number"},"style_score":{"type":"number"},"result":{"type":"number"},"label":{"type":"string"},"fidelity_status":{"type":"string"},"summary":{"type":"string"}},"additionalProperties":false},{"type":"null"}]},"at":{"type":"string"}},"required":["job_id","stage","step_index","steps_total","percent","attempt","pass","message","detail","at"],"additionalProperties":false},"JobErrorEvent":{"type":"object","properties":{"job_id":{"type":"string"},"status":{"type":"string","enum":["failed","cancelled"]},"code":{"type":"string"},"message":{"type":"string"},"stage":{"anyOf":[{"type":"string"},{"type":"null"}]},"retryable":{"type":"boolean"},"refunded_words":{"type":"number"},"at":{"type":"string"}},"required":["job_id","status","code","message","stage","retryable","refunded_words","at"],"additionalProperties":false},"DetectorRun":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string","const":"detector_run"},"status":{"type":"string","enum":["pending","done","failed","timeout"]},"source":{"type":"string","enum":["job","standalone"]},"job_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"provider":{"type":"string","const":"undetectable"},"model":{"type":"string"},"word_count":{"type":"number"},"billed_words":{"type":"number"},"result":{"anyOf":[{"type":"number"},{"type":"null"}]},"label":{"anyOf":[{"type":"string","enum":["human","possible_ai","ai"]},{"type":"null"}]},"details":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number"}},{"type":"null"}]},"chunks":{"type":"number"},"warnings":{"type":"array","items":{"type":"string"}},"input":{"anyOf":[{"type":"object","properties":{"sha256":{"type":"string"},"preview":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["sha256","preview"],"additionalProperties":false},{"type":"null"}]},"created_at":{"type":"string"},"completed_at":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","object","status","source","job_id","provider","model","word_count","billed_words","result","label","details","chunks","warnings","input","created_at","completed_at"],"additionalProperties":false},"Style":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string","const":"style"},"name":{"type":"string"},"sample_word_count":{"type":"number"},"sample":{"type":"string"},"voice_profile":{"anyOf":[{"type":"object","properties":{"sentence_length_p10_p50_p90":{"type":"array","prefixItems":[{"type":"number"},{"type":"number"},{"type":"number"}]},"burstiness":{"type":"number"},"type_token_ratio":{"type":"number"},"contraction_rate":{"type":"number"},"first_person_rate":{"type":"number"},"second_person_rate":{"type":"number"},"question_rate":{"type":"number"},"paren_aside_rate":{"type":"number"},"dash_rate":{"type":"number"},"openers":{"type":"array","items":{"type":"string"}},"transitions":{"type":"array","items":{"type":"string"}},"register_hints":{"type":"array","items":{"type":"string"}}},"required":["sentence_length_p10_p50_p90","burstiness","type_token_ratio","contraction_rate","first_person_rate","second_person_rate","question_rate","paren_aside_rate","dash_rate","openers","transitions","register_hints"],"additionalProperties":false},{"type":"null"}]},"upstream":{"type":"object","properties":{"status":{"type":"string","enum":["none","pending","done","error"]},"provider":{"type":"string","const":"undetectable"},"error_code":{"type":"string"}},"required":["status","provider"],"additionalProperties":false},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","object","name","sample_word_count","voice_profile","upstream","created_at","updated_at"],"additionalProperties":false},"ExtractedText":{"type":"object","properties":{"text":{"description":"The file's text as plain text.","type":"string"},"words":{"type":"integer","minimum":0,"maximum":9007199254740991},"filename":{"type":"string"},"markdown":{"description":"A .docx file's text as Markdown with its headings, lists, bold, italic and links (send it with input_format markdown); null for a .txt file.","anyOf":[{"type":"string"},{"type":"null"}]}},"required":["text","words","filename"],"additionalProperties":false},"Me":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string","const":"user"},"email":{"type":"string"},"email_verified":{"type":"boolean"},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"auth_providers":{"type":"array","items":{"type":"string"}},"plan":{"type":"string","enum":["free","basic","standard","premium"]},"subscription":{"anyOf":[{"type":"object","properties":{"plan":{"type":"string","enum":["free","basic","standard","premium"]},"status":{"type":"string"},"interval":{"type":"string","enum":["month","year"]},"current_period_end":{"type":"string"},"cancel_at_period_end":{"type":"boolean"},"legacy":{"type":"boolean"}},"required":["plan","status","interval","current_period_end","cancel_at_period_end","legacy"],"additionalProperties":false},{"type":"null"}]},"legacy":{"anyOf":[{"type":"object","properties":{"plan":{"type":"string","enum":["basic","standard","premium"]},"ends_at":{"type":"string"},"first_charge_at":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["plan","ends_at","first_charge_at"],"additionalProperties":false},{"type":"null"}]},"offer":{"anyOf":[{"type":"object","properties":{"status":{"type":"string","enum":["eligible","reserved","redeemed"]},"plan":{"type":"string","const":"basic"},"interval":{"type":"string","const":"month"},"until":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["status","plan","interval","until"],"additionalProperties":false},{"type":"null"}]},"limits":{"type":"object","properties":{"words_per_month":{"type":"number"},"max_words_per_job":{"type":"number"},"min_words_per_job":{"type":"number"},"concurrent_jobs":{"type":"number"},"jobs_per_hour":{"type":"number"},"detect_per_hour":{"type":"number"},"style_profiles":{"type":"number"},"api_keys":{"type":"number"},"history_days":{"type":"number"},"text_retention_days":{"type":"number"}},"required":["words_per_month","max_words_per_job","min_words_per_job","concurrent_jobs","jobs_per_hour","detect_per_hour","style_profiles","api_keys","history_days","text_retention_days"],"additionalProperties":false},"features":{"type":"object","properties":{"presets":{"type":"array","items":{"type":"string"}},"strengths":{"type":"array","items":{"type":"string"}},"strategies":{"type":"array","items":{"type":"string"}},"baseline_detect_default":{"type":"boolean"},"rehumanize":{"type":"boolean"},"detect_standalone":{"type":"boolean"},"upstream_style_registration":{"type":"boolean"},"file_upload":{"type":"boolean"},"exports":{"type":"array","items":{"type":"string"}},"developer_api":{"type":"boolean"}},"required":["presets","strengths","strategies","baseline_detect_default","rehumanize","detect_standalone","upstream_style_registration","file_upload","exports","developer_api"],"additionalProperties":false},"words":{"anyOf":[{"type":"object","properties":{"remaining":{"type":"number"},"included":{"type":"number"},"period_end":{"anyOf":[{"type":"string"},{"type":"null"}]},"one_time":{"type":"boolean"}},"required":["remaining","included","period_end","one_time"],"additionalProperties":false},{"type":"null"}]},"trial":{"type":"object","properties":{"used":{"type":"boolean"}},"required":["used"],"additionalProperties":false},"status":{"type":"string","enum":["active","suspended","deletion_scheduled","deleted"]},"role":{"type":"string","enum":["user","admin"]},"created_at":{"type":"string"},"principal":{"type":"object","properties":{"type":{"type":"string","const":"api_key"},"api_key_id":{"type":"string"}},"required":["type","api_key_id"],"additionalProperties":false}},"required":["id","object","email","email_verified","display_name","auth_providers","plan","subscription","legacy","offer","limits","features","words","trial","status","role","created_at"],"additionalProperties":false},"SessionInfo":{"type":"object","properties":{"id":{"type":"string"},"current":{"type":"boolean"},"created_at":{"type":"string"},"last_seen_at":{"type":"string"},"user_agent":{"anyOf":[{"type":"string"},{"type":"null"}]},"city":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","current","created_at","last_seen_at","user_agent","city"],"additionalProperties":false},"ApiKey":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string","const":"api_key"},"name":{"type":"string"},"prefix":{"type":"string"},"created_at":{"type":"string"},"last_used_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"revoked_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"revoked_reason":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","object","name","prefix","created_at","last_used_at","revoked_at"],"additionalProperties":false},"ApiKeyCreated":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string","const":"api_key"},"name":{"type":"string"},"prefix":{"type":"string"},"created_at":{"type":"string"},"last_used_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"revoked_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"revoked_reason":{"anyOf":[{"type":"string"},{"type":"null"}]},"key":{"type":"string"}},"required":["id","object","name","prefix","created_at","last_used_at","revoked_at","key"],"additionalProperties":false},"Usage":{"type":"object","properties":{"object":{"type":"string","const":"usage"},"plan":{"type":"string","enum":["free","basic","standard","premium"]},"billing_mode":{"type":"string","enum":["platform"]},"period":{"type":"object","properties":{"start":{"type":"string"},"end":{"anyOf":[{"type":"string"},{"type":"null"}]},"kind":{"type":"string","enum":["subscription","one_time_grant","legacy","calendar_month"]},"cycle_key":{"type":"string"}},"required":["start","end","kind","cycle_key"],"additionalProperties":false},"words":{"type":"object","properties":{"granted":{"type":"number"},"adjusted":{"type":"number"},"reserved":{"type":"number"},"settled":{"type":"number"},"released":{"type":"number"},"refunded":{"type":"number"},"on_hold":{"type":"number"},"available":{"type":"number"},"used":{"type":"number"}},"required":["granted","adjusted","reserved","settled","released","refunded","on_hold","available","used"],"additionalProperties":false},"detect_words":{"type":"number"},"jobs":{"type":"object","properties":{"created":{"type":"number"},"done":{"type":"number"},"failed":{"type":"number"},"cancelled":{"type":"number"},"rehumanized":{"type":"number"}},"required":["created","done","failed","cancelled","rehumanized"],"additionalProperties":false},"detects":{"type":"number"},"api":{"type":"object","properties":{"requests":{"type":"number"},"jobs":{"type":"number"}},"required":["requests","jobs"],"additionalProperties":false},"ledger":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string"},"pool":{"type":"string"},"words":{"type":"number"},"job_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"detector_run_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"reason":{"type":"string"},"at":{"type":"string"}},"required":["id","kind","pool","words","job_id","detector_run_id","reason","at"],"additionalProperties":false}},"ledger_next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["object","plan","billing_mode","period","words","detect_words","jobs","detects","api","ledger","ledger_next_cursor"],"additionalProperties":false},"Health":{"type":"object","properties":{"status":{"type":"string","enum":["ok","degraded","down","misconfigured"]},"probe":{"type":"string","enum":["th-probe-ok","th-probe-fail"]},"reason":{"type":"string"},"version":{"type":"string"},"environment":{"type":"string"},"time":{"type":"string"},"upstream":{"type":"string","enum":["ok","degraded","credits_exhausted","down","unknown"]},"checks":{"type":"object","properties":{"d1":{"type":"object","properties":{"ok":{"type":"boolean"},"latency_ms":{"type":"number"}},"required":["ok"],"additionalProperties":false},"kv":{"type":"object","properties":{"ok":{"type":"boolean"}},"required":["ok"],"additionalProperties":false},"upstream_credits":{"type":"object","properties":{"state":{"type":"string","enum":["ok","low","exhausted","unknown"]},"checked_at":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["state","checked_at"],"additionalProperties":false},"upstream_reachable":{"type":"object","properties":{"humanize":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"detect":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"style":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"checked_at":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["humanize","detect","style","checked_at"],"additionalProperties":false},"queue_paused":{"type":"boolean"},"intake_paused":{"type":"boolean"},"heartbeats":{"type":"object","properties":{"stale":{"type":"array","items":{"type":"string"}}},"required":["stale"],"additionalProperties":false}},"required":["d1","kv","upstream_credits","upstream_reachable","queue_paused","intake_paused","heartbeats"],"additionalProperties":false}},"required":["status","version","environment","time","checks"],"additionalProperties":false},"PublicConfig":{"type":"object","properties":{"environment":{"type":"string","enum":["dev","staging","prod"]},"turnstileSiteKey":{"type":"string"},"features":{"type":"object","properties":{"billing":{"type":"boolean"},"upstreamMode":{"type":"string","enum":["mock","live"]},"markdownInput":{"type":"boolean"},"signupsPaused":{"type":"boolean"}},"required":["billing","upstreamMode"],"additionalProperties":false},"banner":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["environment","turnstileSiteKey","features","banner"],"additionalProperties":false},"EvalReadout":{"type":"object","properties":{"state":{"type":"string","enum":["live","frozen","expired","withheld"]},"n":{"type":"number"},"first_panel_date":{"anyOf":[{"type":"string"},{"type":"null"}]},"last_panel_date":{"anyOf":[{"type":"string"},{"type":"null"}]},"point":{"anyOf":[{"type":"number"},{"type":"null"}]},"wilson_low":{"anyOf":[{"type":"number"},{"type":"null"}]},"wilson_high":{"anyOf":[{"type":"number"},{"type":"null"}]},"pipeline_version":{"anyOf":[{"type":"string"},{"type":"null"}]},"definition":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["state","n","first_panel_date","last_panel_date","point","wilson_low","wilson_high","pipeline_version","definition"],"additionalProperties":false},"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}},"x-error-codes":[{"code":"BAD_REQUEST","http":400},{"code":"WEBHOOK_SIGNATURE_INVALID","http":400},{"code":"MAGIC_LINK_INVALID","http":400},{"code":"AUTH_TOKEN_INVALID","http":400},{"code":"INVALID_CREDENTIALS","http":401},{"code":"UNAUTHENTICATED","http":401},{"code":"SESSION_EXPIRED","http":401},{"code":"INVALID_API_KEY","http":401},{"code":"API_KEY_REVOKED","http":401},{"code":"RECENT_AUTH_REQUIRED","http":401},{"code":"INSUFFICIENT_WORDS","http":402},{"code":"PLAN_REQUIRED","http":403},{"code":"FEATURE_DISABLED","http":403},{"code":"TURNSTILE_FAILED","http":403},{"code":"CSRF_ORIGIN_MISMATCH","http":403},{"code":"FORBIDDEN","http":403},{"code":"TRIAL_ALREADY_USED","http":403},{"code":"EMAIL_DOMAIN_BLOCKED","http":403},{"code":"ACCOUNT_SUSPENDED","http":403},{"code":"JOB_NOT_FOUND","http":404},{"code":"STYLE_NOT_FOUND","http":404},{"code":"NOT_FOUND","http":404},{"code":"JOB_NOT_CANCELLABLE","http":409},{"code":"JOB_NOT_DELETABLE","http":409},{"code":"JOB_NOT_REHUMANIZABLE","http":409},{"code":"REHUMANIZE_LIMIT_REACHED","http":409},{"code":"STYLE_LIMIT_REACHED","http":409},{"code":"API_KEY_LIMIT_REACHED","http":409},{"code":"ALREADY_SUBSCRIBED","http":409},{"code":"ACCOUNT_DELETION_PENDING","http":409},{"code":"EMAIL_IN_USE","http":409},{"code":"MAGIC_LINK_USED","http":409},{"code":"MAGIC_LINK_EXPIRED","http":410},{"code":"AUTH_TOKEN_USED","http":409},{"code":"AUTH_TOKEN_EXPIRED","http":410},{"code":"TEXTS_EXPIRED","http":410},{"code":"GONE","http":410},{"code":"PAYLOAD_TOO_LARGE","http":413},{"code":"FILE_TOO_LARGE","http":413},{"code":"UNSUPPORTED_MEDIA_TYPE","http":415},{"code":"FILE_TYPE_UNSUPPORTED","http":415},{"code":"VALIDATION_ERROR","http":422},{"code":"INVALID_EMAIL","http":422},{"code":"TEXT_TOO_SHORT","http":422},{"code":"TEXT_TOO_LONG","http":422},{"code":"UNSUPPORTED_LANGUAGE","http":422},{"code":"STYLE_SAMPLE_TOO_SHORT","http":422},{"code":"STYLE_SAMPLE_TOO_LONG","http":422},{"code":"FILE_NO_TEXT","http":422},{"code":"FILE_UNREADABLE","http":422},{"code":"CONTENT_REFUSED","http":422},{"code":"IDEMPOTENCY_KEY_INVALID","http":422},{"code":"IDEMPOTENCY_CONFLICT","http":422},{"code":"CONCURRENCY_LIMIT","http":429},{"code":"RATE_LIMITED","http":429},{"code":"ACCOUNT_LOCKED","http":429},{"code":"INTERNAL_ERROR","http":500},{"code":"UPSTREAM_UNAVAILABLE","http":502},{"code":"BILLING_UNAVAILABLE","http":502},{"code":"BILLING_NOT_CONFIGURED","http":503},{"code":"UPSTREAM_CREDITS_EXHAUSTED","http":503},{"code":"UPSTREAM_BUSY","http":503},{"code":"INTAKE_PAUSED","http":503},{"code":"DAILY_CAPACITY_REACHED","http":503},{"code":"SIGNUPS_PAUSED","http":503},{"code":"QUEUE_UNAVAILABLE","http":503},{"code":"EMAIL_SEND_FAILED","http":503},{"code":"PIPELINE_HALTED","http":503},{"code":"UNKNOWN_PIPELINE_VERSION","http":400},{"code":"DB_UNAVAILABLE","http":503},{"code":"UPSTREAM_TIMEOUT","http":504},{"code":"JOB_TERMINAL","http":409},{"code":"ALREADY_REPLAYED","http":409},{"code":"REFUND_NOT_AVAILABLE","http":409},{"code":"WORKFLOW_CREATE_FAILED","http":500}],"x-warning-codes":["style_replication_unavailable","humanizer_output_failed","unchanged_words_released","protected_span_exposed","citation_reinserted","fidelity_embeddings_unavailable","skeleton_preserved","detector_above_threshold","detector_flagged","detector_split_verdict","detector_low_confidence","detector_unavailable","detector_not_run_on_final","baseline_detector_unavailable","unsupported_language_partial_pipeline","texts_expired","formatting_simplified"],"x-legacy-warning-codes":["humanizer_output_rejected","fidelity_violations","length_drift","slop_gate_not_met","llm_rewrite_unavailable","llm_rewrite_fabricated_rolled_back","chunk_not_rewritten","rewrite_output_rejected","humanizer_unavailable_degraded"],"x-enums":{"presets":["academic_essay","academic_report","article_blog","marketing","business","story","cover_letter","legal","general"],"strategies":["humanize_only","style_replicate_humanized"],"stages":["s0_normalize","s1_mechanical_fix","s4_undetectable_humanize","s5_detector_check","s6_fidelity_check","s7_finalize"]}}