-
Notifications
You must be signed in to change notification settings - Fork 2
Compatible APIs
Each Agent may have multiple API keys for rotation or separate integrations. A full c4o_... secret is shown once when created; only its hash and short prefix are retained.
Revocation, expiry, disablement, deletion, or Agent unavailability invalidates future requests and Tool Sessions owned by that key.
All compatible endpoints require:
Authorization: Bearer <Agent API Key>
Supported endpoints are:
GET /v1/modelsPOST /v1/chat/completionsPOST /v1/messages
agent-default and matching agent-<id> values select the Agent bound to the key. skill-<id> and the optional chat4openapi_skill_ids field may narrow that Agent's Skill catalog but cannot access another Agent. Cross-Agent selection returns 403 auth.agent_key_forbidden without revealing whether the requested Agent exists.
curl -X POST http://127.0.0.1:8000/v1/chat/completions -H "Authorization: Bearer <AGENT_API_KEY>" -H "Content-Type: application/json" --data "{\"model\":\"agent-default\",\"messages\":[{\"role\":\"user\",\"content\":\"List my orders\"}]}"curl -X POST http://127.0.0.1:8000/v1/messages -H "Authorization: Bearer <AGENT_API_KEY>" -H "Content-Type: application/json" --data "{\"model\":\"agent-default\",\"max_tokens\":512,\"messages\":[{\"role\":\"user\",\"content\":\"List my orders\"}]}"When a selected Tool needs upstream business credentials, create a Tool Session first and add:
X-Chat4Openapi-Tool-Session: <Tool Session token>
Tool calls never start an OAuth redirect or wait for Device authorization. Missing credentials return tool_authorization_required; expired or rejected credentials return tool_reauthorization_required.