Skip to main content

Endpoint

POST https://llm.orchid.ac/v1/chat/completions
OpenAI-compatible. Accepts the same request body as POST /v1/chat/completions on the OpenAI API, plus an optional orchid config object.

Request

Headers

HeaderValue
AuthorizationBearer <your-orchid-key>
Content-Typeapplication/json

Body

All standard OpenAI chat completion fields are supported. Key fields:
FieldTypeDefaultDescription
modelstringrequiredUse orchid01
messagesarrayrequiredConversation history
max_tokensinteger4096See Max Tokens
temperaturenumber0.1Ignored in thinking mode (fixed at 1.0)
streambooleanfalseStream response tokens
toolsarrayTool definitions (JSON Schema)
tool_choicestring/objectautoTool selection behaviour
orchidobjectOrchid-specific config (see below)

The orchid config object

FieldTypeDefaultDescription
thinkingbooleanfalseEnable deep reasoning mode
dehallucinatebooleantrueRun grounding check

Response

Standard OpenAI chat completion response, plus an orchid field:
{
  "id":      "chatcmpl-abc123",
  "object":  "chat.completion",
  "model":   "orchid01",
  "choices": [{
    "index":         0,
    "message": {
      "role":    "assistant",
      "content": "According to the filing..."
    },
    "finish_reason": "stop"
  }],
  "usage": {
    "prompt_tokens":     1240,
    "completion_tokens": 380,
    "total_tokens":      1620
  },
  "orchid": {
    "dehallucinate_requested": true,
    "grounded":                true,
    "score":                   0.97,
    "flagged_spans":           [],
    "checked":                 true
  }
}

Error responses

Errors follow the OpenAI error format:
{
  "error": {
    "message": "Invalid API key",
    "type":    "authentication_error",
    "code":    "invalid_api_key",
    "param":   null
  }
}
StatusTypeMeaning
400invalid_request_errorMalformed request body
401authentication_errorInvalid or missing API key
429rate_limit_errorRate limit exceeded
502upstream_errorUpstream provider error