POST /v1/thinking-phrases
Generate playful thinking-status phrases
Generate short, playful loading-status phrases ("Reticulating splines…") for a user's message — the same generator behind the Thinking Phrases you see in Runars chat. Handy for adding a bit of delight while your product thinks.
Phrases are lightly playful and relevant to the topic, but neutral and professional on sensitive subjects. They come back in your organization's language (English or French, per your org's language setting).
Endpoint
POST https://runars.ca/v1/thinking-phrasesAuthentication
Include your API key as a Bearer token:
-H "Authorization: Bearer sk-runars-..."Request body
| Parameter | Type | Required | Description |
|---|---|---|---|
message | string | Yes | The user message to write phrases for (1–16,384 characters) |
The model is chosen by Runars — there is no model parameter. Billing and rate limits apply to the pinned phrases model, exactly like any other endpoint.
Response
Returns 3–8 phrases, each starting with an -ing verb and ending with an ellipsis:
{
"phrases": [
"Reticulating splines…",
"Consulting the moose…",
"Weighing evidence…",
"Sorting facts…"
]
}Billing
Thinking Phrases is billed flat per request — $1.00 per 1,000 requests (see Pricing). The per-request rate applies regardless of the tokens the generation used. Requests that fail to produce phrases (upstream timeout or error) are not billed.
Examples
Using curl
curl https://runars.ca/v1/thinking-phrases \
-H "Authorization: Bearer sk-runars-..." \
-H "Content-Type: application/json" \
-d '{
"message": "How do I change a tire?"
}'Using fetch
const res = await fetch("https://runars.ca/v1/thinking-phrases", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.RUNARS_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({ message: "How do I change a tire?" }),
});
const { phrases } = await res.json();Error responses
Thinking Phrases uses the standard error format. Codes specific to this endpoint:
400 invalid_request_error
Missing or malformed body:
{
"error": {
"message": "message is required (string, 1–16384 chars).",
"type": "invalid_request_error",
"code": null
}
}502 server_error
Generation failed upstream (timeout or model error). Not billed — retry freely:
{
"error": {
"message": "Thinking Phrases generation failed. Please retry.",
"type": "server_error",
"code": null
}
}Standard errors also apply: 401 (invalid key), 429 (rate limit / insufficient quota — see Rate Limits).