Cite-Only Back to app

API

Add citations from your own app

Send an essay or a .docx / .pptx that ends with a References section. Cite-Only returns the text or file with (Author, Year) citations added where a listed source backs the paragraph.

Authentication

Create a key in the app under Account → API keys, then send it on every request:

Authorization: Bearer co_your_key

Base URL: https://…

Keep keys on your server. Never put them in browser or mobile app code. Revoke a key in the app at any time; it stops working immediately.
POST/v1/cite

Adds citations. Send either essay or fileBase64.

Request body (JSON)

FieldDescription
essayPlain text, one paragraph per line, ending with a “References” heading and one source per line.
referencesOptional, with essay only: sources as text, one per line, if they aren't at the end of the essay.
fileBase64A .docx or .pptx file, base64-encoded.
fileNameOptional original file name, used to name the result (“Essay.docx” → “Essay cited.docx”).
minCitesAt least this many citations per cited paragraph, 1–3. Default 1.
maxCitesAt most this many citations per cited paragraph, 1–3. Default 1.
targetModeevery (default), every_other or random: which body paragraphs to consider.

Response

FieldDescription
citations_addedNumber of citations inserted.
cited_textEssay requests: the full cited text, paragraphs separated by blank lines.
cited_file_b64File requests: the cited file, base64-encoded. Formatting is unchanged apart from the citations.
cited_name, file_kindFile requests: suggested file name and docx / pptx.
paragraphsEach paragraph: id, text, eligible, cited_text and decision.citations (citation, reference_id).
referencesSources found: id, text, citation.
skipped_referencesEntries that couldn't be turned into (Author, Year).
warningsHuman-readable notes, e.g. partial coverage.
curl -s https://…/v1/cite \
  -H "Authorization: Bearer $CITE_ONLY_KEY" \
  -H "Content-Type: application/json" \
  -d '{"essay": "Your paragraph with a claim...\n\nReferences\nSmith, J. (2020) Title. London: Sage."}'

Large documents can take a minute or more; use a generous client timeout.

POST/v1/parse

Same input as /v1/cite. Returns the paragraphs, detected references, skipped_references and warnings without adding citations, so you can check a document first. Doesn't count towards usage.

GET/v1/usage

Returns {"ok": true, "usage": {"docs": 12, "citations": 87}} for the key's account.

Errors

Every response has ok. When it's false, error says why.

StatusMeaning
400Missing or unreadable input, or no usable References section.
401invalid_api_key: the key is wrong or revoked.
413Request larger than 12 MB.
429Too many requests. Wait for the Retry-After seconds, then retry.
500 / 503Temporary problem on our side. Retry after a short wait.

Limits and behaviour