Private beta · Early access
Start here
Quickstart
Get a key, set the base URL and model, and make your first call in about five minutes.
Private beta. InferenceIndex is changing fast. Models, endpoints, pricing and these docs may change without notice, so check back before you build on a detail.
A Compiled Agent Model takes the same OpenAI-compatible chat completions request you already send. You set three values: the API key, the base URL, and the model name.
Get a key
- Open https://app.inferenceindex.com.
- Sign in and enter your invite code.
- Get an API key in the dashboard.
Each invite code works once. A key works only once the account has redeemed an invite.
The base URL is https://inferenceindex-skills-25534459979.us-east4.run.app/v1. The model is inferenceindex-0.1.
Python
from openai import OpenAI
client = OpenAI(
api_key="YOUR_KEY",
base_url="https://inferenceindex-skills-25534459979.us-east4.run.app/v1",
)
response = client.chat.completions.create(
model="inferenceindex-0.1",
messages=[
{"role": "user", "content": "Triage this support ticket and name the queue."},
],
)
print(response.choices[0].message.content)TypeScript
import OpenAI from "openai";
const client = new OpenAI({
apiKey: "YOUR_KEY",
baseURL: "https://inferenceindex-skills-25534459979.us-east4.run.app/v1",
});
const response = await client.chat.completions.create({
model: "inferenceindex-0.1",
messages: [
{ role: "user", content: "Extract the invoice total, vendor, and date." },
],
});
console.log(response.choices[0].message.content);curl
curl https://inferenceindex-skills-25534459979.us-east4.run.app/v1/chat/completions \
-H "Authorization: Bearer YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "inferenceindex-0.1",
"messages": [
{"role": "user", "content": "Reply to this lead with a short first touch."}
]
}'What stays the same
Python clients set the base URL on base_url. TypeScript clients set the base URL on baseURL. curl posts to the chat completions path on that base URL. Every sample above uses the model inferenceindex-0.1.
Run one of your workflows
A request that names no skill goes to your fallback model as it is, and its reply comes back as it is. To run a job as a Compiled Agent Model, name the job's skill in the model:
response = client.chat.completions.create(
model="inferenceindex-0.1/skl_YOUR_SKILL_ID",
messages=messages,
tools=tools,
)- A saved skill. Save the job once as a skill, then send its id in the model name. Add
@2to pin a version. The skills page shows how, and takes a standardSKILL.mdas it is. - No skill yet. Send
"plan": truein the body (extra_bodyin the OpenAI SDKs) with your tools, and a skill is written for the request from them. Add"plan": {"save": true}to keep it as one of your skills. - Your tools stay yours. Tool calls come back as
tool_callsfor your agent to run. Send each result back with its tool call id unchanged. - Reads can come together. One response can carry several
tool_callswhen they are reads that don't wait on each other. Run them all, at the same time if you like, and send every result back before the next request. A skill can name writes that go out together the same way, in a## Parallelsection.
GET /v1/models lists inferenceindex-0.1 and each of your saved skills.
What comes back
- The model name. Every response and stream chunk reports
model: "inferenceindex-0.1". - Streaming.
stream: trueworks as it does with OpenAI. Tool calls arrive whole. - The
inferenceindexobject. Each response carriesinferenceindex, withcharged_usd,llm_model(the model that wrote any text), anddecision.margin, how sure the run was of each tool call. A null margin means no confidence, so hold that call for a person. inferenceindex.verdict. A skill run can close with a verdict:outcome(pass,rework,fail, orescalate),reason, andscope(run, orstep:Nwhen a step asked for its own).escalatealso hasactionRequired, what a person has to do.inferenceindex.checks. When the skill has checks, the response lists each one:step,id,ok,required,onFailure, anddetail.inferenceindex.reasoning_effort. The effort the request asked for, ornone. The values are on the API reference.inferenceindex.plan.replaces. When the user asks for something new partway through a planned run and the run starts over, this is the id of the plan it replaced.- A call limit. A skill run makes at most 40 tool calls. At the limit it ends with an answer saying what was and wasn't done, and
inferenceindex.limit_reached: 40, never an error. - Did it complete? A skill run's final answer carries
inferenceindex.checkwith arun_id. SendPOST /v1/feedbackwith{"run_id": "run_…", "completed": true}(orfalse, with acomment). Answering is optional, and the latest answer counts. Arun_idthat isn't one of yours is404withrun_not_found. Send"check": falsein the body to turn the question off. Nothing about the run is kept then. - Errors use the OpenAI error shape.
Next
Point one real job at it. The cookbook has recipes for contract review, inbox actions, support triage, invoice reconciliation, and meeting notes.