DocumentationGetting started

Invoke a model in minutes.

Start with the latest shared model through the API. When you need an isolated deployment, deploy your own model and use the same inference contract.

1 · Use the latest global model

Make your first API request immediately.

Create a Piro API key, set it in your environment, and invoke the newest shared model with a typed observation. No deployment is required for this first request.

Shared model request

ashfall-ctm-smoke-250-progress

This example is wired to the latest enabled global deployment at page render time. Run it from a server or terminal, and keep the API key private.

export PIRO_MODEL="b675fccf-1a4a-4b91-8f92-d1453abdff55"
export PIRO_API_KEY="piro_..."

curl "https://trainpiro.app/api/models/$PIRO_MODEL/invoke" \
  -H "Authorization: Bearer $PIRO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "parts": [
    { "type": "text", "text": "Remember that I prefer concise answers." }
  ]
}'
Shared model safety boundary. Global models are for exploration and testing. Do not use them as a production or privacy boundary, and do not send sensitive data.

Request body

Send a typed observation

Text input uses one part with type: "text". The body must contain at least one non-empty part.

{
  "parts": [
    { "type": "text", "text": "Remember that I prefer concise answers." }
  ]
}

Response

Read the model output

The response uses the same packet shape under the output property.

{
  "output": {
    "parts": [
      { "type": "text", "text": "..." }
    ]
  }
}

2 · Deploy your own model

Move to a private inference endpoint when you need one.

Private deployments use the same API shape as the global model, but give you a dedicated model target for your application.

  1. 1

    Open Models

    Choose Deploy Your Model and select a pretrained model.

  2. 2

    Create the deployment

    Submit the deployment and wait for Stateful inference ready.

  3. 3

    Create an API key

    Use Profile → API Keys. Store the raw key in an environment variable.

  4. 4

    Invoke private inference

    Replace the model ID in the request below with your private deployment ID.

export PIRO_MODEL="your-private-model-id"
export PIRO_API_KEY="piro_..."

curl "https://trainpiro.app/api/models/$PIRO_MODEL/invoke" \
  -H "Authorization: Bearer $PIRO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "parts": [
    { "type": "text", "text": "Remember that I prefer concise answers." }
  ]
}'