← Back to home

Documentation

Everything you need to integrate Rubberduck into your agent pipeline.

API Reference

POST/api/verify-preview

Submit an agent plan for cross-model verification. Returns a verdict with risk score, concerns, and suggestions.

Authentication

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:

Authorization: Bearer dk_your_api_key_here

Request Format

FieldTypeRequiredDescription
planstringYesThe agent plan to verify. 1-5,000 characters.
source_modelstringYesThe model that generated the plan (e.g., "gpt-4", "claude-3"). Used for cross-model routing.
contextstringNoAdditional context about the agent's environment. Max 5,000 characters.

Response Format

FieldTypeDescription
verdictstringapprove | flag | reject
risk_scorenumber0-100. Higher = more risk. 0-30 safe, 30-70 caution, 70+ dangerous.
concernsstring[]Specific risks identified in the plan.
suggestionsstring[]Recommended changes to make the plan safer.
loop_detectedbooleanTrue if a repeating plan pattern was detected.
model_usedstringWhich reviewer model analyzed the plan.

Error Codes

StatusDescription
400Invalid request body. Check that plan and source_model are present.
401Invalid or missing API key (production endpoint only).
429Rate limit exceeded. Preview: 3/hour. Production: 30/minute.
502Reviewer model returned an error. Retry after a few seconds.
503Service not configured. Reviewer API keys not set.

Cross-Model Verification

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.

Routing Table

Source ModelReviewer
GPT-4, GPT-4o, o1, o3MiniMax M2.5
MiniMax, Claude, GeminiGPT-4o-mini
Other / UnknownGPT-4o-mini

Loop Detection

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: true
  • circuit_breaker_recommendation with a suggested action

Use this to pause your agent pipeline and review the plan generation logic before burning through API budget.

Rate Limits

EndpointLimitAuth
/api/verify-preview1 free verification / day / IPNone
/api/verify30 requests / minute / IPAPI Key required

SDKs & Integrations

Coming Soon

Drop-in middleware for your agent framework. One import, one line of config.

Python SDKTypeScript SDKLangChain MiddlewareCrewAI HookAutoGen Plugin

Dashboard & Analytics

Coming Soon

Monitor verification history, risk scores, loop detection events, and team usage in real time.

Want to try the API now? Run a free verification