Compat
Create completion
Legacy text completion on the OpenRouter-compatible /api/v1 base.
Authorizations
Authorizationstringheaderrequired
Bearer token:
Authorization: Bearer ozk_…. ozk_ platform API key (Authorization: Bearer ozk_…)Authorizationstringheaderrequired
Bearer token:
Authorization: Bearer sk-ocean-…. Legacy sk-ocean- inference key: still accepted on the money plane until the sk-ocean- sunset; new integrations use the ozk_ keyBody
application/jsonmodelstringrequired
Example: "openai/gpt-4o-mini"
promptstringrequired
One string; arrays answer 400 unsupported_parameter.
Example: "Say hi in three words"
max_tokensinteger
Example: 16
streamboolean
Response
Text completion
application/json
idstring
objectenum<string>
Available options: text_completion
choicesobject[]
usageobject
invalid_json — body is not valid JSON; unsupported_parameter — prompt must be a single string
application/json
errorobjectrequired
Missing/invalid key
application/json
errorobjectrequired
model_not_found — no such model in the catalog
application/json
errorobjectrequired
method_not_allowed — the path serves one method: the Allow header names it, plus OPTIONS
application/json
Response headers
Allowstring
The method this path serves, plus OPTIONS
errorobjectrequired