Skip to content

Completions

POST /<lane>/v1/completions — the OpenAI legacy text-completions shape, kept for older integrations. Prefer Chat or Responses for new work.

Terminal window
curl "https://api.opengateway.one/oss/v1/completions" \
-H "Authorization: Bearer $OPENGATEWAY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "claude-turbo-hub-gpt-oss-20b",
"prompt": "// a one-line TypeScript type guard for string\n",
"max_tokens": 64
}'
{
"id": "cmpl-...",
"object": "text_completion",
"model": "claude-turbo-hub-gpt-oss-20b",
"choices": [
{ "index": 0, "text": "const isString = (v: unknown): v is string => typeof v === 'string';", "finish_reason": "stop" }
]
}

Streaming is supported via stream: true.