FastGPTFastGPT

Developers

Choose API integration or extension development to connect FastGPT and build plugins, model presets, and Skills.

Choose a development task

Developer Integration Architecture

FastGPT provides an open capability matrix for enterprise systems and developers:

Integrate through a trusted backendIntegrate through a trusted backend

Keep API keys on a trusted server. Identity proxy is optional and requires endpoint support and a trusted mapping to a member in the same team. MCP clients use the separately configured MCP service and its authentication.

Credential Types and Authentication

Each endpoint declares the credentials it accepts. Check the authentication method for each endpoint in /apidoc/systemopenapi or /apidoc/devapi before integrating.

CredentialTransport LocationPermission ScopeRecommended Scenario
Team API KeyAuthorization: Bearer <apiKey>Scoped to resources available to the issuing team memberBackend integrations, automated jobs, model calls
User Session TokenCookie fastgpt_token or token headerCurrent member permissions, subject to endpoint authorization and session checksWeb UI communication, same-origin management APIs
Root KeyHeader rootkey: <ROOT_KEY>Administrative operations on endpoints that explicitly enable root authenticationCross-team maintenance, model status probing, migrations

Core Integration Workflows

  1. API Quick Start: Obtain team API keys, execute the first end-to-end request, and connect via the official OpenAI SDK.
  2. Identity Proxy: Execute on behalf of end users using authProxy to enforce member-level permissions and audit logging.
  3. Application and Workflow Integration: Execute published Chat Agents, Agent V2, and Workflows while injecting global variables.
  4. Conversations and 18 SSE Stream Events: Maintain persistent chatId sessions and parse answer chunks, thoughts, node statuses, plans, and interactive pauses.
  5. Knowledge Base Integration: Create collections via API, push content to training queues asynchronously, and run search tests.

Plugin System

Machine-Readable OpenAPI Contracts

Each FastGPT deployment generates OpenAPI 3.1 specification files locally:

  • System OpenAPI (API Key Operations): Access /apidoc/systemopenapi (UI) or /api/apidoc/systemopenapi.json (JSON).
  • Dev API (Full Developer Operations): Access /apidoc/devapi (UI) or /api/apidoc/devapi.json (JSON).

When maintaining older integrations, refer to Historical API Parameters and Migration.

Edit on GitHub

Last updated

On this page

Put your business knowledge to work with AI

Import company documents and build accurate, reliable, traceable AI answers.