> ## Documentation Index
> Fetch the complete documentation index at: https://docs.profy.cn/llms.txt
> Use this file to discover all available pages before exploring further.

# Developer Platform Overview

> Explore the full capabilities, authentication methods, and core concepts of the Profy Developer Platform

The Profy Developer Platform provides a complete set of APIs that let you integrate AI Expert capabilities into your own applications. Whether you want to call an AI Agent from a backend service or build an AI-powered application for end users, the Profy platform has you covered.

## Capabilities at a Glance

<CardGroup cols={2}>
  <Card title="Agents Run" icon="robot" href="/en/developers/api/agents-run">
    Invoke a Profy Expert (AI Agent) and receive streaming responses via SSE. Supports multi-turn conversations, tool calls, memory, and more.
  </Card>

  <Card title="Chat Completions" icon="comments" href="/en/developers/api/chat-completions">
    OpenAI-compatible chat completions. Supports `profy-*` model names to call Experts directly — zero code changes with the OpenAI SDK.
  </Card>

  <Card title="Events" icon="bolt" href="/en/developers/api/events">
    Report custom billing events for per-use billing scenarios in your App. Includes idempotency support to prevent duplicate charges.
  </Card>

  <Card title="Models" icon="list" href="/en/developers/api/models">
    Retrieve the list of available models and their capabilities to help you choose the right one.
  </Card>

  <Card title="Meters" icon="gauge" href="/en/developers/api/meters">
    Query your App's billing meter configuration and understand the charge rules for each event.
  </Card>
</CardGroup>

## Two Authentication Methods

The Profy platform offers two authentication methods for different scenarios:

<Tabs>
  <Tab title="API Key">
    **Use cases**: Server-side direct calls, scripts, background tasks

    * Prefixed with `sk-pro-`
    * Passed in the request header via `Authorization: Bearer sk-pro-xxxx`
    * Credits deducted from the **developer's own account**
    * Created and managed in the [Platform Console](https://platform.profy.cn)

    ```bash theme={null}
    curl -H "Authorization: Bearer sk-pro-xxxx" \
         https://api.profy.cn/v1/models
    ```
  </Tab>

  <Tab title="OAuth Bearer">
    **Use cases**: Apps acting on behalf of users

    * Standard OAuth 2.0 Authorization Code flow
    * Access Token passed via `Authorization: Bearer <access_token>`
    * Credits deducted from the **authorizing user's account**
    * Supports token refresh and revocation

    ```bash theme={null}
    curl -H "Authorization: Bearer eyJhbGciOi..." \
         https://api.profy.cn/v1/chat/completions
    ```
  </Tab>
</Tabs>

For details, see the [Authentication Guide](/en/developers/authentication).

## Core Concepts

### Expert (AI Agent)

Expert is the core product type on the Profy platform — an AI Agent equipped with a persona, tools, memory, and skills. Through the `/v1/agents/run` endpoint, you can invoke any published Expert via API.

### Expert-as-Model

Use the `/v1/chat/completions` endpoint with `model="profy-<identifier>"` to call any published Profy Expert using the standard OpenAI SDK. The Expert's full Agent capabilities (persona, tools, memory, skills) are completely transparent to developers — you interact with it just like calling `gpt-4o`. This lets creators' domain-specific AI Agents seamlessly integrate into any tool chain that supports the OpenAI API (LangChain, Cursor, etc.).

### App (External Application)

An App is an external application that integrates with Profy's identity and billing system via OAuth + Events API. App developers can leverage Profy's user system and credit-based billing to quickly monetize their products.

### Billing Models

| Model         | Description                        | Typical Use Case                  |
| ------------- | ---------------------------------- | --------------------------------- |
| **METERED**   | Per-token billing                  | AI conversations, text generation |
| **PER\_USE**  | Per-event billing (via Events API) | Custom feature invocations        |
| **ONE\_TIME** | One-time purchase                  | Expert unlock, Static Site        |

## Developer Console

[Platform Console](https://platform.profy.cn) is your unified console for managing API integrations:

* **API Keys**: Create, view, and revoke API Keys
* **Usage Stats**: View call volume trends and distribution
* **Call Logs**: Search and inspect details of every API call
* **Playground**: Test APIs online (coming soon)

The Platform Console shares login sessions with the main site `app.profy.cn` — simply log in to the main site and you can access it directly.

## SDKs

Profy provides official SDKs for Python and TypeScript, handling authentication, streaming, error handling, and more:

<CodeGroup>
  ```bash Python theme={null}
  pip install profy
  ```

  ```bash TypeScript theme={null}
  npm install @profy-ai/sdk
  ```
</CodeGroup>

<CodeGroup>
  ```python Python theme={null}
  from profy import Profy

  async with Profy(api_key="sk-pro-...") as client:
      result = await client.agents.run("my-expert", "Hello")
      print(result.text)
  ```

  ```typescript TypeScript theme={null}
  import { Profy } from "@profy-ai/sdk";

  const client = new Profy({ apiKey: "sk-pro-..." });
  const result = await client.agents.run("my-expert", "Hello");
  console.log(result.text);
  ```
</CodeGroup>

## MCP Server

Profy provides an MCP (Model Context Protocol) Server that works directly in IDEs like Cursor and Codex. With MCP, you can create, configure, publish, and view earnings for Experts — all without leaving your editor.

For details, see [MCP Server Integration](/en/developers/mcp-server).

## Next Steps

<CardGroup cols={2}>
  <Card title="Quickstart" icon="rocket" href="/en/developers/quickstart">
    Complete your first API call in 5 minutes
  </Card>

  <Card title="Authentication Guide" icon="lock" href="/en/developers/authentication">
    Learn about API Key and OAuth usage in detail
  </Card>

  <Card title="API Reference" icon="code" href="/en/developers/api/agents-run">
    Browse the complete API endpoint documentation
  </Card>

  <Card title="Build an App" icon="grid-2" href="/en/developers/app-development">
    Learn how to build a Profy App
  </Card>
</CardGroup>
