Translation

Run Stage 1 optimization

Returns the input improved in the language it was written in. By default it improves the whole text (word choice, flow, clarity, sentence structure) while keeping meaning, voice, facts, code and line breaks; correctionsOnly: true fixes spelling, grammar and punctuation only. Task-context-free: attachments, per-request custom instructions, and context project grounding are not supported and are silently dropped. Requires the optimize:write scope.

post/api/v1/optimize

Request

  • Base URL: https://www.devspeak.dev
  • URL: https://www.devspeak.dev/api/v1/optimize
  • Auth: one of:
    • API key in header x-api-key
    • HTTP bearer

Request body

inputstring required
audience'Junior Dev' | 'Senior Dev' | 'Tech Lead' | 'SRE' | 'Data Engineer' required
context'Backend' | 'Frontend' | 'Mobile' | 'Data/ML' | 'DevOps' required
managedModelstring

Allowlisted managed model pin. Omit to use the fast Stage 1 default.

translationIdstring
correctionsOnlyboolean

Write mode. false (default) improves the whole text in its own language (word choice, flow, clarity, sentence structure); true fixes spelling, grammar and punctuation only.

Response

Optimized text

successtrue required

Changes

No recorded changes to this operation across all 1 revision of this API.