Skip to content

Chat Completions

Fresh

Generate conversational chat completions using Mercury 2.

Endpoint

POST https://api.inceptionlabs.ai/v1/chat/completions

Request 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

ParameterTypeDefaultDescription
modelstringMust be "mercury-2"
messagesarrayArray of message objects with role and content
max_tokensint8192Max tokens to generate (1-50,000)
temperaturefloat0.75Randomness control (0.5-1.0)
stoparraynullUp to 4 stop sequences
streamboolfalseEnable streaming
diffusingboolfalseEnable diffusion visualization
toolsarraynullTool/function definitions
response_formatobjectnullJSON schema for structured output
reasoning_effortstring"medium"instant, low, medium, high

Message Roles

RolePurpose
systemSet the assistant's behavior
userThe user's message
assistantPrevious 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 summary
  • reasoning_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"])

See Also