Inference Endpoint¶
POST /v1/chat/completions
Run an inference and receive a cryptographically signed receipt proving execution integrity, routing, and settlement.
Request Format¶
{
"model": "default",
"messages": [
{"role": "system", "content": "You are a compliance assistant."},
{"role": "user", "content": "Summarize HIPAA Section 164.312."}
],
"privacy_tier": "sovereign"
}
Required Fields¶
| Field | Type | Description |
|---|---|---|
model |
string |
Model identifier. Use "default" or a specific model ID from your provisioned models. |
messages |
array |
Array of message objects, each with role and content. |
Message Roles¶
| Role | Description |
|---|---|
system |
Sets context and behavior constraints |
user |
The user's input |
assistant |
Previous model responses (for multi-turn) |
Optional Fields¶
| Field | Type | Default | Description |
|---|---|---|---|
privacy_tier |
string |
"standard" |
Routing privacy level (see below) |
temperature |
float |
1.0 |
Sampling temperature (0.0 -- 2.0) |
max_tokens |
integer |
Model default | Maximum tokens in the response |
stream |
boolean |
false |
Enable streaming responses |
Privacy Tiers¶
SIX supports three privacy tiers that control how your request is routed and isolated.
| Tier | Routing | Data Boundary | Use Case |
|---|---|---|---|
standard |
Shared compute | Provider boundary | General workloads, development |
sovereign |
Dedicated compute | Your boundary | Regulated data (HIPAA, SOX) |
confidential |
Isolated compute | Hardware-enforced | Maximum isolation requirements |
Default Tier
If privacy_tier is omitted, requests route to "standard". For regulated workloads, always specify "sovereign" or "confidential".
Privacy Tier Details
Full routing architecture, isolation guarantees, and hardware attestation documentation for each privacy tier are available to NDA partners.
Request documentation →
Full routing architecture, isolation guarantees, and hardware attestation documentation for each privacy tier are available to NDA partners.
Request documentation →
Response Format¶
{
"id": "six-abc123",
"object": "chat.completion",
"created": 1706900000,
"model": "default",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "HIPAA Section 164.312 establishes technical safeguards..."
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 42,
"completion_tokens": 156,
"total_tokens": 198
},
"receipt": {
"receipt_id": "rcpt_f8c505ce3a...",
"routing": "sovereign",
"commitment": "04a7f3c2...e9b1d0f",
"signature": "0x69c8...f98c8",
"verified": true
}
}
Standard Fields¶
These match the OpenAI chat-completion response format:
| Field | Type | Description |
|---|---|---|
id |
string |
Unique inference identifier |
object |
string |
Always "chat.completion" |
created |
integer |
Unix timestamp of execution |
model |
string |
Model that processed the request |
choices |
array |
Array of response choices |
usage |
object |
Token usage counts |
Receipt Object¶
The receipt object is the cryptographic proof. See Receipt Format for field-by-field documentation.
| Field | Type | Description |
|---|---|---|
receipt_id |
string |
Unique receipt identifier for later verification |
routing |
string |
Confirmed routing path (sovereign, standard, confidential) |
commitment |
string |
Cryptographic commitment binding all receipt fields |
signature |
string |
Server signature over the commitment |
verified |
boolean |
Server-side verification result |
Examples¶
import requests
response = requests.post(
"https://six-sov.com/v1/chat/completions",
headers={
"Authorization": f"Bearer {SIX_API_KEY}",
"Content-Type": "application/json"
},
json={
"model": "default",
"messages": [
{"role": "user", "content": "Summarize HIPAA Section 164.312"}
],
"privacy_tier": "sovereign"
}
)
data = response.json()
receipt = data["receipt"]
print(f"Receipt ID: {receipt['receipt_id']}")
print(f"Verified: {receipt['verified']}")
from openai import OpenAI
client = OpenAI(
api_key="YOUR_SIX_API_KEY",
base_url="https://six-sov.com/v1"
)
response = client.chat.completions.create(
model="default",
messages=[
{"role": "user", "content": "Summarize HIPAA Section 164.312"}
],
extra_body={"privacy_tier": "sovereign"}
)
print(response.choices[0].message.content)
# Receipt available in response metadata
Streaming¶
When stream: true, the response is delivered as server-sent events (SSE). The receipt is included in the final [DONE] event:
data: {"choices":[{"delta":{"content":"HIPAA"}}]}
data: {"choices":[{"delta":{"content":" Section"}}]}
...
data: {"choices":[{"delta":{"content":"."}}],"finish_reason":"stop"}
data: {"receipt":{"receipt_id":"rcpt_...","verified":true}}
data: [DONE]
Error Handling¶
See Error Codes for the full error reference.
Common inference-specific errors:
| Code | Cause | Resolution |
|---|---|---|
400 |
Empty messages array |
Provide at least one message |
422 |
Invalid privacy_tier value |
Use standard, sovereign, or confidential |
422 |
temperature out of range |
Use a value between 0.0 and 2.0 |
503 |
Model temporarily unavailable | Retry with exponential backoff |
Next Steps¶
- Receipt Format -- Understand what each receipt field proves
- Verification Endpoint -- Verify receipts after the fact
- Python Integration -- Full Python guide