Unrefused

Completions & embeddings

POST /v1/completions and POST /v1/embeddings.

POST /v1/completions

Raw text completion. prompt may be a string or an array of strings. The input policy stage runs over each prompt (PII redaction applies); profile system-prompt prepends do not apply to raw completions. Streaming works as for chat, with choices[].text deltas.

POST /v1/embeddings

input may be a string or up to 2,048 strings. The input stage runs, so a profile with pii: redact embeds the redacted text. There is no output stage; x-unrefused-output reads n/a. Usage counts prompt tokens only.

shell
curl https://api.unrefused.com/v1/embeddings \
  -H "Authorization: Bearer $UNREFUSED_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"embed-base","input":["hello","call +44 20 7946 0958"]}'

Spot an error or a gap? Tell us — and quote x-request-id if you have one.