Customer API
Voice Rewrite API
Call the voice model from the app you already use. A CRM, Claude, or Grok Bot sends the draft. Apograph returns it in your voice, with a LUAR score. A human still copies and sends. Nothing auto-sends.
| Piece | Customer call |
|---|---|
| Voice model | POST /api/v1/voice/rewrite |
| LUAR | On rewrite, and POST /api/v1/voice/luar |
| Gauntlet | Not on this contract yet. The website scores it. A customer key cannot. |
OpenAPI: /docs/voice-rewrite.openapi.yaml
Base URL
| Where | URL |
|---|---|
| Local portal | http://localhost:3000 |
| Hosted Apograph | https://apograph.ai |
Routes live under /api/v1. Give the HTTP client at least 120 seconds. Do not point production traffic at localhost. If a response includes "non_production": true, the seat used a desk URL — treat that as dogfood.
Auth
External apps send a Bearer tenant key. Generate a high-entropy secret, set APOGRAPH_TENANT_API_KEY on the portal host, and send the same secret from the writing app. Never put the key in the JSON body, in git, or in tickets. Rotate by generating a new secret, updating the host, then the app. A signed-in portal cookie also works for browser tools.
Authorization: Bearer $APOGRAPH_TENANT_API_KEY Content-Type: application/json
POST /api/v1/voice/rewrite
Rewrite text in the caller’s seat. LUAR is scored in this response (a number, never null, never "async"). If LUAR cannot be scored, the call fails closed with luar_unavailable.
| Field | Required | Notes |
|---|---|---|
| text | yes | Non-empty after trim. Max 150000 characters. |
| voice_seat_id | no | Default c1rw. Unknown seats fail closed. |
| channel | no | email | linkedin_message | note | generic |
| polish | no | false (default) or "light" |
| max_words | no | Positive number. Cap on the voiced draft. |
| context | no | Prior thread. Background only. Send it on a reply. Max 80000 characters. |
| counterpart | no | Person or company. Stored on the tenant log. |
| account | no | strand, genstrata, or another short tag. |
| client | no | grok, grok-build, claude, grok-web, or other. |
Copy-paste curl
curl -sS -X POST "$APOGRAPH_BASE_URL/api/v1/voice/rewrite" \
-H "Authorization: Bearer $APOGRAPH_TENANT_API_KEY" \
-H "Content-Type: application/json" \
-d @- <<'EOF'
{
"text": "Thanks for the intro. I can walk through how we measure whether a draft still sounds like the author, then we can pick a time next week.",
"channel": "email",
"polish": false
}
EOFPOST /api/v1/voice/luar
Score-only LUAR after you edit or polish in the writing app. Same auth. Does not rewrite. Does not send. Pass capture_id from the rewrite to update that row on the tenant log.
Copy-paste curl
curl -sS -X POST "$APOGRAPH_BASE_URL/api/v1/voice/luar" \
-H "Authorization: Bearer $APOGRAPH_TENANT_API_KEY" \
-H "Content-Type: application/json" \
-d @- <<'EOF'
{
"text": "Thanks for the intro. I can walk you through how we score whether a draft still sounds like you, then we can find a time next week."
}
EOFErrors
| HTTP | error | What you do |
|---|---|---|
| 401 | unauthorized | Fix the key. Do not retry the same secret. |
| 400 | bad_request | Fix the body. message says which field. |
| 503 | voice_unavailable | Retry after the voice seat is on. No voiced_text. |
| 503 | luar_unavailable | Do not ship. Retry when scoring is up. |
Product LUAR floor is 0.60. A 200 with luar_below_floor: true still includes voiced_text — you decide whether to copy. Token use is returned on rewrite as usage. There is no auto-send and no spend dashboard on this contract.
Wire it in
- Set APOGRAPH_TENANT_API_KEY on the portal host and in the writing app.
- Set APOGRAPH_BASE_URL to localhost or https://apograph.ai.
- POST rewrite. Read voiced_text and luar.
- If luar_below_floor or luar_unavailable, do not send.
- Paste the voiced text. The human hits send in that app.
- On a reply, put the prior thread in context and the person's name in counterpart.
Claude, Grok Bot, and any other app
Any app that can send an HTTPS POST can call this. The blocks below are the standing instructions for Claude and Grok. Paste one into that product. Set APOGRAPH_TENANT_API_KEY in that app's secret store, not in the instruction text. Hosted calls use https://apograph.ai.
Grok Bot
Standing instructions on the Grok Bot computer
- Set APOGRAPH_BASE_URL and APOGRAPH_TENANT_API_KEY in the environment that bot shells inherit.
- Paste the instruction below into the bot’s standing instructions.
- Ask it to rewrite a reply. It should POST, then show voiced_text, luar, and capture_id.
Instruction to paste
You can call HTTP. When I ask you to rewrite a draft in my voice, POST the JSON below. Do not rewrite it yourself. Do not invent a LUAR score.
Base URL: https://apograph.ai
Header: Authorization: Bearer $APOGRAPH_TENANT_API_KEY
Never put the key in the chat, in a committed file, or in the JSON body.
POST https://apograph.ai/api/v1/voice/rewrite
{
"text": "ONLY the new message I would send",
"context": "Prior thread, who said what. Background only. Send this whenever the person already knows me.",
"counterpart": "Name of the person this message is for",
"account": "strand",
"channel": "email",
"client": "grok",
"polish": false
}
Read voiced_text, luar, luar_below_floor, and capture_id.
If luar_below_floor is true, show it and wait. Do not tell me to send.
If the call fails, show the error. Do not substitute your own rewrite.
After I edit the draft, POST https://apograph.ai/api/v1/voice/luar
{ "text": "the current draft", "capture_id": "the capture_id from rewrite" }
Show the new luar. That updates the log on the Apograph website.
Strand work is mostly replies. Put the message history in context, not in text.
Use "account": "genstrata" when the thread is Genstrata.
I send the message myself. You never send email or LinkedIn.
Grok Build
The instruction file Grok Build loads, plus the shell environment
- Set APOGRAPH_BASE_URL and APOGRAPH_TENANT_API_KEY before you launch grok, so curl can see them.
- Paste the instruction below into the user or repo instructions Grok Build reads.
- Say “rewrite that in my voice.” It runs the POST. It does not invent the score.
Instruction to paste
You can call HTTP. When I ask you to rewrite a draft in my voice, POST the JSON below. Do not rewrite it yourself. Do not invent a LUAR score.
Base URL: https://apograph.ai
Header: Authorization: Bearer $APOGRAPH_TENANT_API_KEY
Never put the key in the chat, in a committed file, or in the JSON body.
POST https://apograph.ai/api/v1/voice/rewrite
{
"text": "ONLY the new message I would send",
"context": "Prior thread, who said what. Background only. Send this whenever the person already knows me.",
"counterpart": "Name of the person this message is for",
"account": "strand",
"channel": "email",
"client": "grok-build",
"polish": false
}
Read voiced_text, luar, luar_below_floor, and capture_id.
If luar_below_floor is true, show it and wait. Do not tell me to send.
If the call fails, show the error. Do not substitute your own rewrite.
After I edit the draft, POST https://apograph.ai/api/v1/voice/luar
{ "text": "the current draft", "capture_id": "the capture_id from rewrite" }
Show the new luar. That updates the log on the Apograph website.
Strand work is mostly replies. Put the message history in context, not in text.
Use "account": "genstrata" when the thread is Genstrata.
I send the message myself. You never send email or LinkedIn.
Claude
A Claude project, or Claude Code, that can run HTTP
- Set APOGRAPH_BASE_URL and APOGRAPH_TENANT_API_KEY where that Claude can read them.
- Paste the instruction below into the project instructions or CLAUDE.md.
- A browser chat with no HTTP tool must say it cannot reach Apograph. It must not fake voiced_text or luar.
Instruction to paste
You can call HTTP. When I ask you to rewrite a draft in my voice, POST the JSON below. Do not rewrite it yourself. Do not invent a LUAR score.
Base URL: https://apograph.ai
Header: Authorization: Bearer $APOGRAPH_TENANT_API_KEY
Never put the key in the chat, in a committed file, or in the JSON body.
POST https://apograph.ai/api/v1/voice/rewrite
{
"text": "ONLY the new message I would send",
"context": "Prior thread, who said what. Background only. Send this whenever the person already knows me.",
"counterpart": "Name of the person this message is for",
"account": "strand",
"channel": "email",
"client": "claude",
"polish": false
}
Read voiced_text, luar, luar_below_floor, and capture_id.
If luar_below_floor is true, show it and wait. Do not tell me to send.
If the call fails, show the error. Do not substitute your own rewrite.
After I edit the draft, POST https://apograph.ai/api/v1/voice/luar
{ "text": "the current draft", "capture_id": "the capture_id from rewrite" }
Show the new luar. That updates the log on the Apograph website.
Strand work is mostly replies. Put the message history in context, not in text.
Use "account": "genstrata" when the thread is Genstrata.
I send the message myself. You never send email or LinkedIn.
Grok website
grok.com → Settings → Personalization → Custom Instructions
- Customize Grok on grok.com cannot call this API.
- Paste the instruction below so that chat refuses to imitate a voice rewrite.
- Use Grok Bot or Grok Build for the live call. Those drafts still show up in the log on this page.
Instruction to paste
You cannot call HTTP from this chat. When I ask you to rewrite a draft in my voice, say this chat cannot reach Apograph. Do not invent voiced text or a LUAR score. Point me at Grok Build or Grok Bot.
Base URL: https://apograph.ai
Header: Authorization: Bearer $APOGRAPH_TENANT_API_KEY
Never put the key in the chat, in a committed file, or in the JSON body.
POST https://apograph.ai/api/v1/voice/rewrite
{
"text": "ONLY the new message I would send",
"context": "Prior thread, who said what. Background only. Send this whenever the person already knows me.",
"counterpart": "Name of the person this message is for",
"account": "strand",
"channel": "email",
"client": "grok-web",
"polish": false
}
Read voiced_text, luar, luar_below_floor, and capture_id.
If luar_below_floor is true, show it and wait. Do not tell me to send.
If the call fails, show the error. Do not substitute your own rewrite.
After I edit the draft, POST https://apograph.ai/api/v1/voice/luar
{ "text": "the current draft", "capture_id": "the capture_id from rewrite" }
Show the new luar. That updates the log on the Apograph website.
Strand work is mostly replies. Put the message history in context, not in text.
Use "account": "genstrata" when the thread is Genstrata.
I send the message myself. You never send email or LinkedIn.