export INCEPTION_API_KEY="your_api_key_here"
set INCEPTION_API_KEY="your_api_key_here"
curl https://api.inceptionlabs.ai/v1/fim/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $INCEPTION_API_KEY" \
-d '{
"model": "mercury-edit-2",
"prompt": "def fibonacci(",
"suffix": "return a + b"
}'
from inceptionai import Inception
client = Inception() # reads INCEPTION_API_KEY from the environment
completion = client.fim.completions.create(
model="mercury-edit-2",
prompt="def fibonacci(",
suffix="return a + b",
)
print(completion.choices[0].text)
import Inception from 'inceptionai';
const client = new Inception(); // reads INCEPTION_API_KEY from the environment
const completion = await client.fim.completions.create({
model: 'mercury-edit-2',
prompt: 'def fibonacci(',
suffix: 'return a + b',
});
console.log(completion.choices[0]?.text);