model.
This requires the Agent API Keys feature to be enabled for your organization, and the Remote Agents → Use permission on your role. By default, only administrators have this permission — ask your administrator to grant it if you need it. You also need at least view access to the agent you want to call.
Prerequisites
- Your organization has enabled Agent API Keys.
- Your role has Remote Agents → Use enabled.
- You are the owner of the agent you want to call. Being an editor or viewer of a shared agent is not enough to call it through the API.
1. Create an API key
1
Open API Keys
Go to Settings → API Keys.
2
Create a key
Create a new key. Copy it immediately — you won’t be able to see it again.
3
Store it securely
Treat it like a password: store it in a secrets manager or environment variable, never in client-side code or a public repository.
2. Find your agent’s ID
The API identifies an agent by its ID, not its name. The simplest way to get it:1
Open Agents → All agents
Find the agent you want to call.
2
Copy its link
Open the agent’s ⋯ menu and choose Copy link. This copies a URL that looks like
https://wonka.chat/c/new?agent_id=<AGENT_ID>.3
Extract the ID
The value after
agent_id= is the agent’s ID. Use it as the model value in your API calls.Base URL and authentication
Authorization header with your API key:
Chat Completions
- curl
- Python (OpenAI SDK)
conversation_id and parent_message_id from the previous response on the next request. Set "stream": true to receive an SSE stream of chat.completion.chunk events instead of a single JSON response.
Open Responses API
For agentic use cases that want structured, item-based output, the same agent is also available through the Open Responses endpoint:id (resp_...) you can pass back as previous_response_id to continue the same thread, an output array of items, and a usage object.
Listing agents
GET /models only lists agents that have been explicitly enabled for remote API access — for most organizations this list is short or empty. Don’t rely on it to discover an agent’s ID; get the ID from the WonkaChat UI as shown above, and use GET /models/:model to check whether a specific agent ID is callable.Errors
Error responses follow the OpenAI error shape:
{ "error": { "message": "...", "type": "...", "code": "..." } }.
Using it from n8n or Make
Both tools ship a generic OpenAI node/module that accepts a custom base URL. Point it athttps://<your-domain>/api/agents/v1, use your WonkaChat API key as the credential, and set the model field to your agent’s ID. This lets you call a WonkaChat agent as a step in an automation without writing custom HTTP requests.