Skip to main content

Publish an agent to the customer portal

Publish with a price

Who: Model manage permission Where: Agents → ⋯ → Publish
  1. On the agent list, open the ⋯ menu and choose Publish.
  2. Enter the price: Input cost (USD) (for example 0.50), Output cost (USD) (for example 1.50) and Cost per: 1K, 5K, 10K, 50K, 1M or 10M tokens.
  3. Click Publish.
Customers then find the agent under Agents in the portal and call it with their own keys. Publish Details shows the current Input Cost, Output Cost and tokens per price, and the price history. Publishing does not run any governance check. Attach and test your policies before you publish.

Call the agent from code

Open Use this agent from the agent’s Home tab or its row in the list. The Code Snippet tab gives cURL, Python and JavaScript for each endpoint with your agent’s name and version filled in. A voice-enabled version adds the WebSocket addresses. See also Call an agent in Calling models from your applications.

Responses API

Call /v1/responses with the agent’s name as prompt.id. Add prompt.version in the body to pin a version; without it the default version answers. Put the agent’s variables in prompt.variables.

Long runs in the background

Add "background": true. The call returns at once with a response in the queued state. Fetch it, or cancel it, using its id:
  • Cancelling is only allowed on background responses; any other response returns 409. Cancelling twice is harmless.
  • Background runs appear on the agent’s Runs tab like any other, so you can watch, approve or stop them there (Governing and supervising agents).
  • You can only fetch and cancel responses created with your own key.

Agent to agent (A2A)

Every agent version can be called by other agents and A2A clients over JSON-RPC at /a2a/<agent>/v<N>/. Use v0 for the agent’s default version. The methods are message/send, message/stream, tasks/get and tasks/cancel. The agent card is at /a2a/<agent>/v0/.well-known/agent-card.json.
Responses and A2A calls use a project API key as a bearer token. Keep keys out of front-end code.