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
Personal API keyAuthorization: Bearer <apiKey>Accesses permitted team resources as the issuing member on endpoints that accept personal API keysBackend integrations, automated jobs, model calls
App API key (v4.18.0+)Authorization: Bearer <apiKey>Bound to one app for its chat and chat management endpoints; authorization comes from the key itselfIntegrating a specific app and identifying business users with customUid
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: Choose a personal API key or an app API key, 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. 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.