/api/verify-previewSubmit an agent plan for cross-model verification. Returns a verdict with risk score, concerns, and suggestions.
The preview endpoint requires no authentication. It's rate-limited to 3 requests per hour per IP.
The production endpoint (/api/verify) requires an API key passed via the Authorization header:
| Field | Type | Required | Description |
|---|---|---|---|
| plan | string | Yes | The agent plan to verify. 1-5,000 characters. |
| source_model | string | Yes | The model that generated the plan (e.g., "gpt-4", "claude-3"). Used for cross-model routing. |
| context | string | No | Additional context about the agent's environment. Max 5,000 characters. |
| Field | Type | Description |
|---|---|---|
| verdict | string | approve | flag | reject |
| risk_score | number | 0-100. Higher = more risk. 0-30 safe, 30-70 caution, 70+ dangerous. |
| concerns | string[] | Specific risks identified in the plan. |
| suggestions | string[] | Recommended changes to make the plan safer. |
| loop_detected | boolean | True if a repeating plan pattern was detected. |
| model_used | string | Which reviewer model analyzed the plan. |
| Status | Description |
|---|---|
| 400 | Invalid request body. Check that plan and source_model are present. |
| 401 | Invalid or missing API key (production endpoint only). |
| 429 | Rate limit exceeded. Preview: 3/hour. Production: 30/minute. |
| 502 | Reviewer model returned an error. Retry after a few seconds. |
| 503 | Service not configured. Reviewer API keys not set. |
Rubber Duck routes each plan to a reviewer from a different AI model family than the one that generated it. Same-model self-review misses the same errors the model made in the first place.
| Source Model | Reviewer |
|---|---|
| GPT-4, GPT-4o, o1, o3 | MiniMax M2.5 |
| MiniMax, Claude, Gemini | GPT-4o-mini |
| Other / Unknown | GPT-4o-mini |
Rubber Duck hashes each plan and tracks submissions per account. If 3 or more identical plans are submitted within 60 seconds, the response includes:
loop_detected: truecircuit_breaker_recommendation with a suggested actionUse this to pause your agent pipeline and review the plan generation logic before burning through API budget.
| Endpoint | Limit | Auth |
|---|---|---|
| /api/verify-preview | 1 free verification / day / IP | None |
| /api/verify | 30 requests / minute / IP | API Key required |
Drop-in middleware for your agent framework. One import, one line of config.
Monitor verification history, risk scores, loop detection events, and team usage in real time.
Want to try the API now? Run a free verification