Skip to Content
API reference

API reference

The Strokes Writing Intelligence HTTP API — base URL, authentication, endpoints and conventions.

Base URL

https://api.strokes.ink

All endpoints live under /v1. Requests and responses are JSON, except a streamed reply.

Authentication

Send your API key in the x-api-key header, or as Authorization: Bearer <key>. Create keys in the console. See Authentication.

curl https://api.strokes.ink/v1/models \
  -H "x-api-key: $STROKES_API_KEY"

Endpoints

MethodPath
POST/v1/messagesSend a conversation, get the next message
POST/v1/chat/completionsThe same, in OpenAI's Chat Completions format
GET/v1/modelsList the models
GET/v1/models/{model_id}Get one model
GET/v1/strokesList strokes in your organization
GET/v1/strokes/{stroke_id}Get a stroke's facts and voice profile
PUT/v1/strokes/{stroke_id}Create or replace a stroke
PATCH/v1/strokes/{stroke_id}Update facts or voice profile on a stroke
DELETE/v1/strokes/{stroke_id}Delete a stroke and its facts
POST/v1/agent-keyTrade a one-time setup token from Copy for agent for an API key

Compatibility

/v1/messages and /v1/models follow the Anthropic Messages API: the same paths, fields, objects, stream events and errors. Anthropic's SDKs work with baseURL set to https://api.strokes.ink or https://api.strokes.ink/v1. Headers they send, such as anthropic-version, are accepted and ignored. What is and isn't supported is listed in Create a message. /v1/chat/completions follows OpenAI's Chat Completions API, so the OpenAI SDKs work with baseURL set to https://api.strokes.ink/v1; /v1/models answers in a shape both SDKs read. /v1/strokes and /v1/agent-key are Strokes' own.

Response headers

Header
request-idA unique ID for the request, req_…. Include it when you report a problem
strokes-modeThe mode used for the reply: business, academic or creative (omitted when none was chosen). On /v1/messages and /v1/chat/completions

Limits

There is no requests-per-minute limit. Your organization's credits and each key's monthly spend limit bound usage. See Limits and spend.

On this page