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 the System OpenAPI Reference Overview or your deployment's /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. Official TypeScript SDK, Official Python SDK, Official Go SDK, & Official Java SDK: Use the strongly typed official SDKs for sync/async chat, SSE streaming, interactive Workflow resumption, Dataset management, and auto-pagination.
  3. Identity Proxy: Execute on behalf of end users using authProxy to enforce member-level permissions and audit logging.
  4. Knowledge Base Integration: Create collections via API, push content to training queues asynchronously, and run search tests.

Plugin System

Machine-Readable OpenAPI Contracts

Read the static reference and OpenAPI 3.1 contract on the official documentation site, or open the interactive Scalar console on any FastGPT deployment:

  • Official System OpenAPI Reference & Spec: Browse the System OpenAPI Reference Overview, or fetch the CORS-enabled OpenAPI 3.1 JSON Spec (/openapi.json) and OpenAPI LLM Corpus (/llms-openapi.txt).
  • Instance System OpenAPI (Interactive Try-It-Out): Access /apidoc/systemopenapi (UI) or /api/apidoc/systemopenapi.json (JSON) on your FastGPT deployment.
  • Instance Dev API (Full Internal Developer Operations): Access /apidoc/devapi (UI) or /api/apidoc/devapi.json (JSON) on your FastGPT deployment.

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.