Chat Completions
FreshGenerate conversational chat completions using Mercury 2.
Endpoint
POST https://api.inceptionlabs.ai/v1/chat/completionsRequest Format
bash
curl https://api.inceptionlabs.ai/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $INCEPTION_API_KEY" \
-d '{
"model": "mercury-2",
"messages": [
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "What is a diffusion model?"}
]
}'Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
model | string | — | Must be "mercury-2" |
messages | array | — | Array of message objects with role and content |
max_tokens | int | 8192 | Max tokens to generate (1-50,000) |
temperature | float | 0.75 | Randomness control (0.5-1.0) |
stop | array | null | Up to 4 stop sequences |
stream | bool | false | Enable streaming |
diffusing | bool | false | Enable diffusion visualization |
tools | array | null | Tool/function definitions |
response_format | object | null | JSON schema for structured output |
reasoning_effort | string | "medium" | instant, low, medium, high |
Message Roles
| Role | Purpose |
|---|---|
system | Set the assistant's behavior |
user | The user's message |
assistant | Previous assistant responses (for multi-turn) |
Reasoning Effort
Control how much reasoning the model applies:
- instant — Near-real-time, ideal for chatbots and voice
- low — Quick responses with light reasoning
- medium — Balanced (default)
- high — Maximum reasoning depth
Additional parameters:
reasoning_summary(default: true) — Returns a reasoning summaryreasoning_summary_wait(default: false) — Delays response until reasoning is ready
Python Example
python
import os
import requests
response = requests.post(
"https://api.inceptionlabs.ai/v1/chat/completions",
headers={
"Content-Type": "application/json",
"Authorization": f"Bearer {os.environ['INCEPTION_API_KEY']}"
},
json={
"model": "mercury-2",
"messages": [
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "Explain quantum computing in simple terms."}
],
"max_tokens": 1000,
"temperature": 0.75
}
)
print(response.json()["choices"][0]["message"]["content"])