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 key
  • 402: insufficient credits (top up or reduce usage)
  • 422: invalid request body
  • 429: rate limited, retry with backoff
  • 5xx: transient error, retry with jitter

Production notes

  • Add request timeouts.
  • Retry only safe failures.
  • Log request ids and outcomes.
  • Store minimal data.

Next steps