Using agents over API
Call Corgent from your backend with one request. Keep API keys off the browser.
Request
curl -X POST "https://api.corgent.ai/v1/agents/invoke" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $CORGENT_API_KEY" \
-d '{
"agent": "corgent/morning-brief/1.0.0",
"input": {
"message": "Generate my morning briefing"
}
}'
Errors
401: bad or missing API key402: insufficient credits (top up or reduce usage)422: invalid request body429: rate limited, retry with backoff5xx: transient error, retry with jitter
Production notes
- Add request timeouts.
- Retry only safe failures.
- Log request ids and outcomes.
- Store minimal data.