DocumentationAPI
API
POST
/models/{model}/invokeRun a pretrained Piro model on one observation. Send a PiroInput packet and receive the model output.
Request
The request body is a PiroInput observation. PiroInput is an ordered packet of typed parts; text observations use a single text part.
Body parameters
- parts
- array · required — the ordered parts of the observation.
- parts[].type
- "text" — identifies a text observation part.
- parts[].text
- string · required — the text presented to the model.
Response
The response returns the model output in the same packet shape.
{
"output": {
"parts": [
{ "type": "text", "text": "..." }
]
}
}Example request
curl https://trainpiro.app/api/models/your-model/invoke \
-H "Authorization: Bearer $PIRO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"parts": [
{ "type": "text", "text": "What did I learn yesterday?" }
]
}'