Prerequisites
- A Profy account (register at app.profy.cn)
- Python 3.8+ or Node.js 18+ (if using the SDK)
Step 1: Get an API Key
- Log in at app.profy.cn
- Visit platform.profy.cn (shares login session with the main site)
- Go to the API Keys page
- Click Create API Key, enter a name, and select permission scopes
- Copy the generated key (prefixed with
sk-pro-)
Step 2: Make Your First Call
Choose your preferred method:- Python SDK
- TypeScript SDK
- curl
Install the SDK:Call an Expert:If you prefer synchronous code:
Step 3: Stream Responses
For scenarios that require real-time display of AI output, use streaming mode:Step 4: Multi-Turn Conversations
Pass asession_id to continue the same conversation:
Understanding SSE Events
/v1/agents/run returns a standard SSE event stream. Here are the core event types you will encounter:
For the full event type list, see Agents Run API.
Using Chat Completions
If you are already using the OpenAI API, you can switch directly to Profy’s compatible endpoint:- Call a raw model
- Call an Expert via OpenAI SDK
Next Steps
Authentication Guide
Learn more about API Key and OAuth usage
Agents Run API
View the complete Expert invocation API documentation
Python SDK
Complete Python SDK guide
TypeScript SDK
Complete TypeScript SDK guide

