FastGPTFastGPT
API Getting Started

System OpenAPI Reference Overview

Browse FastGPT System OpenAPI across 4 groups and 11 modules, including auth rules, base URLs, OpenAPI 3.1 JSON specs, and Scalar consoles.

This documentation portal provides static, structured reference pages for FastGPT System OpenAPI—covering 51 operations organized into 4 groups and 11 modules explicitly exposed for API key authentication. It is designed for browser navigation, single-page Markdown retrieval, and AI coding agents.

To run same-origin Try it out requests in a browser or inspect internal Dev API operations, open the /apidoc/* interactive consoles on FastGPT Cloud or your self-hosted deployment.

Base URLs and Endpoints

EnvironmentAPI Request Base URLInstance Interactive Console (Scalar)
International Cloudhttps://cloud.fastgpt.io/apiSystem OpenAPI · Dev API
Mainland China Cloudhttps://cloud.fastgpt.cn/apiSystem OpenAPI · Dev API
Self-Hosted Instance<instance>/api<instance>/apidoc/systemopenapi · <instance>/apidoc/devapi

Authentication and Identity Rules

Pass your API key in the standard Authorization HTTP header:

Authorization: Bearer <apiKey>
  • Personal API Key: Created under Account → API Keys, executing with the issuing team member's resource permissions. Pass appId explicitly when calling application chat endpoints (or use the OpenAI SDK compatibility suffix Bearer <apiKey>-<appId>). Supports authProxy (FastGPT >= v4.15.0) to delegate identity to another active team member; see API and MCP identity proxy.
  • App API Key (FastGPT >= v4.18.0): Created under Studio → Target App → Publish Channels → API Access → App keys. Bound to a single application for chat, history, and log endpoints without passing appId, and supports customUid to identify external end users.
  • First Integration: Start with API getting started: make your first request for end-to-end cURL and OpenAI SDK examples.

4 Groups and 11 Modules

1. Foundation

2. Applications

3. Chat

4. Knowledge Base

Machine-Readable Discovery (GEO & Tooling)

For coding agents, SDK generators, and HTTP schema importers, the official documentation portal publishes machine-readable contracts:

  • OpenAPI 3.1 JSON Spec: https://doc.fastgpt.io/openapi.json (/openapi.json, served with Access-Control-Allow-Origin: * for direct cross-origin tool ingestion).
  • OpenAPI Markdown Corpus: https://doc.fastgpt.io/llms-openapi.txt (/llms-openapi.txt, full clean Markdown for all active System OpenAPI pages, parameter schemas, and SSE examples).
  • Root LLM Index: https://doc.fastgpt.io/llms.txt (/llms.txt).
  • Single-Page Markdown: Append .md to any endpoint reference URL (for example, https://doc.fastgpt.io/openapi/reference/dataset-search/search.md) or send Accept: text/markdown.

Interactive Scalar Consoles and Dev API

  • Scalar API Explorer: Each endpoint reference page includes a direct anchor link to the cloud Scalar explorer so you can supply an API key and test requests interactively. On self-hosted deployments, open <instance>/apidoc/systemopenapi (or <instance>/api/apidoc/systemopenapi.json for the instance-local JSON).
  • Dev API (Internal & Administrative Operations): Covers source-code customization, web UI RPCs, and root maintenance operations secured by session cookies (fastgpt_token) or rootkey. To keep authentication scopes unambiguous, Dev API is excluded from static public docs and default AI corpora; inspect it directly on your deployment at <instance>/apidoc/devapi (or on FastGPT Cloud /apidoc/devapi).
  • Legacy Reference: Handwritten historical parameter docs remain archived in 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.