---
title: "Run a PACKIQ AI packaging co-worker"
method: POST
path: "/packiq/run"
tags: ["PACKIQ"]
---

# Run a PACKIQ AI packaging co-worker

`POST /packiq/run`

## Request

- Base URL: `https://opnplatform.com/api`
- URL: `https://opnplatform.com/api/packiq/run`
- Auth: HTTP bearer

Runs an agent on your data, grounded in live PackIndex context. Auth: OPN API key or JWT. The agent's credit cost is deducted atomically and refunded if the run fails.

## Request body

- object
  - `agent_id` string, required: From GET /api/packiq/agents
  - `inputs` union, required: Agent-specific fields as an object, or the data as one text block (max 24,000 chars)
    - object
    - string

## Response `200`

Agent result

- PackiqResult: Response from POST /api/packiq/run.
  - `agent_id` string
  - `cost_deducted` integer
  - `credits_remaining` integer
  - `model` string
  - `result` unknown
  - `tokens_used` integer

## Other responses

- `400`: agent_id or inputs missing
- `401`: Missing or invalid API key / JWT
- `402`: Insufficient credits — body has balance, needed, topup_url
- `403`: Guest sessions cannot use /run
- `404`: Unknown agent_id — call GET /api/packiq/agents
- `409`: Agent temporarily unavailable
- `502`: AI service error — credits refunded (credits_refunded in body)

---

[API](https://skmtc.dev/opnplatform/apis/packindex-packiq-api-open-packaging-network.md) · [All operations](https://skmtc.dev/opnplatform/apis/packindex-packiq-api-open-packaging-network/llms.txt) · [OpenAPI document](https://skmtc.dev/opnplatform/apis/packindex-packiq-api-open-packaging-network/revisions/f427c0467bb2?raw)
