LLM

Proxy OpenAI-compatible legacy completion

Credit-gated legacy completions endpoint. Request and response shape follows OpenAI-compatible /completions semantics.

post/v1/llm/completions

Request

  • Base URL: / (relative, and the document was published on a file host, not at the API’s origin)
  • URL: /v1/llm/completions
  • Auth: HTTP bearer

Headers

Idempotency-Keystring required

Required stable key for metered POST retries. Reusing the same key for the same user, route, and method reuses the same credit reservation anchor.

x-solomon-use-casestring

Optional feature/use-case label recorded in LLMUsage for cost allocation.

x-solomon-sub-use-casestring

Optional sub-use-case label recorded in LLMUsage.

x-solomon-agent-namestring

Optional agent name recorded in LLMUsage.

Request body

max_tokensinteger

Maximum output tokens to reserve and request.

modelstring required

Desktop-facing LLM model id.

promptstring required

Prompt string or prompt array forwarded to the upstream.

streamboolean

When true, stream upstream completion events.

temperaturenumber

Sampling temperature forwarded to the upstream.

Example request

{
  "max_tokens": 512,
  "model": "openai/gpt-4.1-mini",
  "prompt": "Summarize this account.",
  "temperature": 0.2
}

Response

OpenAI-compatible JSON response, or text/event-stream when stream=true.

LLMGatewayResponse required

OpenAI-compatible upstream response. For streaming calls, the same endpoint returns text/event-stream chunks.

Changes

No operation changes recorded.