Endpoint
POST /v1/chat/completions on the OpenAI API, plus an optional orchid config object.
Request
Headers
| Header | Value |
|---|---|
Authorization | Bearer <your-orchid-key> |
Content-Type | application/json |
Body
All standard OpenAI chat completion fields are supported. Key fields:| Field | Type | Default | Description |
|---|---|---|---|
model | string | required | Use orchid01 |
messages | array | required | Conversation history |
max_tokens | integer | 4096 | See Max Tokens |
temperature | number | 0.1 | Ignored in thinking mode (fixed at 1.0) |
stream | boolean | false | Stream response tokens |
tools | array | — | Tool definitions (JSON Schema) |
tool_choice | string/object | auto | Tool selection behaviour |
orchid | object | — | Orchid-specific config (see below) |
The orchid config object
| Field | Type | Default | Description |
|---|---|---|---|
thinking | boolean | false | Enable deep reasoning mode |
dehallucinate | boolean | true | Run grounding check |
Response
Standard OpenAI chat completion response, plus anorchid field:
Error responses
Errors follow the OpenAI error format:| Status | Type | Meaning |
|---|---|---|
400 | invalid_request_error | Malformed request body |
401 | authentication_error | Invalid or missing API key |
429 | rate_limit_error | Rate limit exceeded |
502 | upstream_error | Upstream provider error |