API reference · Agents
What a run of a published agent would hold first
POST/api/agents/public/{slug}/quoteSigned in session
The first step's worst case and the run's ceiling, in micro-USD, for the signed in visitor. Same origin only. A 404 while hosted runs or public agents (ANTIMATTER_AGENT_PUBLISH) are off on the deployment.
Parameters
| Field | Type | What it is |
|---|---|---|
| slug (path)required | string | The published agent's slug. |
Request body
application/json, required
| Field | Type | What it is |
|---|---|---|
| inputrequired | array of object | The conversation so far; the last message must be the visitor's. |
| input[] | any | One of "user", "assistant". |
| input[] | string |
Example
{
"input": [
{
"role": "user",
"content": "Say hello in five words."
}
]
}Answer 200
The quote.
| Field | Type | What it is |
|---|---|---|
| object | string | |
| first_step_micros | integer | |
| max_cost_micros | integer |
Errors
- 400OpenAI shaped error.
- 401OpenAI shaped error.
- 404OpenAI shaped error.
- 429OpenAI shaped error.
Every error answers in one shape, with its type, code and the field it names. The whole list is in the docs' Errors section.