diff --git a/docs/docs/guidelines/api.mdx b/docs/docs/guidelines/api.mdx index 8bba633fb..6ba2c3a72 100644 --- a/docs/docs/guidelines/api.mdx +++ b/docs/docs/guidelines/api.mdx @@ -1,5 +1,6 @@ import useBaseUrl from "@docusaurus/useBaseUrl"; import ZoomableImage from "/src/theme/ZoomableImage.js"; +import Admonition from "/src/theme/Admonition.js"; # API Keys @@ -7,12 +8,17 @@ import ZoomableImage from "/src/theme/ZoomableImage.js"; Langflow offers an API Key functionality that allows users to access their individual components and flows without going through traditional login authentication. The API Key is a user-specific token that can be included in the request's header or query parameter to authenticate API calls. The following documentation outlines how to generate, use, and manage these API Keys in Langflow. + + This feature requires the `LANGFLOW_AUTO_LOGIN` environment variable to be set + to `False`. The default user and password are set using _`LANGFLOW_SUPERUSER`_ + and _`LANGFLOW_SUPERUSER_PASSWORD`_ environment variables. Default values are + _`langflow`_ and _`langflow`_ respectively. + + ## Generating an API Key ### Through Langflow UI -{/* add image img/api-key.png */} - \ + http://localhost:3000/api/v1/run/ \ -H 'Content-Type: application/json'\ -H 'x-api-key: '\ -d '{"inputs": {"text":""}, "tweaks": {}}'