Skip to main content
Invoke a Profy Expert (AI Agent) and receive a complete response via SSE streaming, including text output, tool calls, and token usage.

Authentication

Authorization
string
required
Bearer sk-pro-xxxx (API Key) or Bearer <access_token> (OAuth)

Request Body

expert_identifier
string
required
The Expert’s unique identifier. You can find it on the Expert’s marketplace page or in Studio.
message
string
required
The message content to send to the Expert.
session_id
string
Session ID for multi-turn conversations. Not required for the first call — a new session_id is returned in the X-Session-Id response header.
model
string
Specify the model to use. Defaults to the platform’s default model if not provided. Use GET /v1/models to query available models.

Request Examples

Response Format

The response is an SSE (Server-Sent Events) stream with hierarchical dot-notation event names (aligned with the OpenAI Responses API). The response headers include X-Session-Id for subsequent multi-turn conversations.

SSE Event Types

Lifecycle Events

Output Events

Tool Call Events

Usage Events

Streaming Examples

Billing

Billed by token usage (METERED), with credits deducted from the caller’s account. Refer to the real-time rates displayed in the product. You can obtain the token consumption for each call from the usage.token event.

Error Codes

Next Steps

Chat Completions

OpenAI-compatible chat completions endpoint

Python SDK

Complete Python SDK guide