export INCEPTION_API_KEY="your_api_key_here"
set INCEPTION_API_KEY="your_api_key_here"
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?" }
]
}'
from inceptionai import Inception
client = Inception() # reads INCEPTION_API_KEY from the environment
completion = client.chat.completions.create(
model="mercury-2",
messages=[
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "What is a diffusion model?"},
],
)
print(completion.choices[0].message.content)
import Inception from 'inceptionai';
const client = new Inception(); // reads INCEPTION_API_KEY from the environment
const completion = await client.chat.completions.create({
model: 'mercury-2',
messages: [
{ role: 'system', content: 'You are a helpful assistant.' },
{ role: 'user', content: 'What is a diffusion model?' },
],
});
console.log(completion.choices[0]?.message.content);