Skip to content

docs: add required API key headers for 1.5#8721

Merged
mendonk merged 41 commits into
mainfrom
docs-add-api-auth-requirement
Jul 10, 2025
Merged

docs: add required API key headers for 1.5#8721
mendonk merged 41 commits into
mainfrom
docs-add-api-auth-requirement

Conversation

@mendonk
Copy link
Copy Markdown
Collaborator

@mendonk mendonk commented Jun 24, 2025

This pull request updates the API documentation to include the x-api-key header in all relevant examples, ensuring that API requests are authenticated.

The most important part for review are these pages:

Explain the changes for AUTO_LOGIN in 1.5. Preview

Clarify the creation of Langflow API keys with the CLI. Preview

Summary by CodeRabbit

  • Documentation
    • Updated all API documentation examples to include the required x-api-key header for authentication.
    • Standardized the use of the LANGFLOW_API_KEY environment variable in example commands.
    • Expanded and clarified instructions for API key management and authentication.
    • Revised quickstart and component examples to demonstrate API key usage.
    • Improved consistency and clarity across all API and component documentation.

@mendonk mendonk self-assigned this Jun 24, 2025
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jun 24, 2025

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Walkthrough

The documentation for Langflow's API and component usage was updated to consistently include the x-api-key header in all example API requests. This header, typically set to $LANGFLOW_API_KEY or LANGFLOW_API_KEY, is now shown in all relevant curl, Python, and JavaScript code snippets to indicate API key authentication is required.

Changes

Files/Paths Change Summary
docs/docs/API-Reference/api-build.md, api-files.md, api-flows-run.md, Added x-api-key header with $LANGFLOW_API_KEY in all example curl commands for authentication.
api-flows.md, api-logs.md, api-monitor.md, api-projects.md,
api-reference-api-examples.md, api-users.md Updated API key environment variable to LANGFLOW_API_KEY and ensured all examples use this header.
docs/docs/Components/components-data.md, components-io.md, Added x-api-key: LANGFLOW_API_KEY header to all example curl commands for component usage.
components-processing.md
docs/docs/Concepts/concepts-playground.md Added x-api-key: LANGFLOW_API_KEY header to Playground API example requests.
docs/docs/Configuration/configuration-api-keys.md Expanded and clarified API key authentication documentation; updated CLI and UI instructions.
docs/docs/Develop/session-id.md, webhook.md Added x-api-key: LANGFLOW_API_KEY header to example curl commands.
docs/docs/Get-Started/get-started-quickstart.md Added API key as a prerequisite; updated all code examples to include x-api-key header.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant API_Server

    User->>API_Server: HTTP request with x-api-key: LANGFLOW_API_KEY
    API_Server-->>User: Authenticated response (success or error)
Loading

Possibly related PRs

Suggested labels

lgtm

Suggested reviewers

  • KimberlyFields
  • jordanrfrazier
✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch docs-add-api-auth-requirement

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai auto-generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@mendonk mendonk requested a review from aimurphy June 24, 2025 22:19
@github-actions github-actions Bot added the documentation Improvements or additions to documentation label Jun 24, 2025
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 24, 2025

Build successful! ✅
Deploying docs draft.
Deploy successful! View draft

@github-actions github-actions Bot added documentation Improvements or additions to documentation and removed documentation Improvements or additions to documentation labels Jun 25, 2025
@mendonk mendonk marked this pull request as ready for review June 25, 2025 16:04
@github-actions github-actions Bot added documentation Improvements or additions to documentation and removed documentation Improvements or additions to documentation labels Jun 25, 2025
@dosubot dosubot Bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Jun 25, 2025
@github-actions github-actions Bot added documentation Improvements or additions to documentation and removed documentation Improvements or additions to documentation labels Jun 25, 2025
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 25, 2025

Build successful! ✅
Deploying docs draft.
Deploy successful! View draft

@github-actions github-actions Bot added documentation Improvements or additions to documentation and removed documentation Improvements or additions to documentation labels Jun 25, 2025
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 6

♻️ Duplicate comments (1)
docs/docs/Get-Started/get-started-quickstart.md (1)

383-386: Repeat of invalid header syntax in the later Python snippet.

Please mirror the earlier fix.

🧹 Nitpick comments (8)
docs/docs/Configuration/configuration-api-keys.md (1)

14-17: Re-phrase to avoid repetition and reduce wordiness

AUTO_LOGIN is enabled, AUTO_LOGIN requires …” repeats the variable name and reads awkwardly.
Suggested wording:

-Prior to Langflow v1.5, when `AUTO_LOGIN` was enabled (`AUTO_LOGIN=true`), Langflow automatically logged users in as a superuser without requiring authentication.
-As of Langflow v1.5, when `AUTO_LOGIN` is enabled, `AUTO_LOGIN` requires a valid API key.
+Before Langflow v1.5, setting `AUTO_LOGIN=true` logged users in as a super-user automatically.  
+From Langflow v1.5 onward, `AUTO_LOGIN=true` still works, but the request must include a valid API key.
docs/docs/Develop/session-id.md (1)

20-26: Missing $ in environment-variable placeholder

-  --header 'x-api-key: LANGFLOW_API_KEY' \
+  --header "x-api-key: $LANGFLOW_API_KEY" \

Ensures the example works when copied into a shell.

docs/docs/Develop/webhook.md (1)

35-38: Placeholder formatting

Same consistency issue: add $ before LANGFLOW_API_KEY.

-        -H 'x-api-key: LANGFLOW_API_KEY' \
+        -H "x-api-key: $LANGFLOW_API_KEY" \
docs/docs/API-Reference/api-reference-api-examples.md (1)

87-88: Variable rename acknowledged – check earlier reference

The new examples properly switch to LANGFLOW_API_KEY.
However, line 99 still shows -H 'x-api-key: $API_KEY' (unchanged). Consider updating that older reference for consistency.

Also applies to: 154-157

docs/docs/Components/components-processing.md (1)

117-117: Use the same $LANGFLOW_API_KEY placeholder used elsewhere

Other docs use the environment-variable form $LANGFLOW_API_KEY, but these snippets omit the leading $. Aligning the placeholder prevents copy-paste surprises for users who have already exported the variable.

-  -H 'x-api-key: LANGFLOW_API_KEY' \
+  -H 'x-api-key: $LANGFLOW_API_KEY' \

Also applies to: 211-211, 234-234, 420-420

docs/docs/API-Reference/api-flows-run.md (2)

9-9: Typo: “amd” → “and”.

Minor spelling mistake in the first sentence.

-Use the `/run` amd `/webhook` endpoints to run flows.
+Use the `/run` and `/webhook` endpoints to run flows.

130-135: Header-table example is now inconsistent with the surrounding docs.

All examples above were updated to use the $LANGFLOW_API_KEY placeholder, but the “Example” column still shows the hard-coded "sk-...". This can confuse readers.

-| x-api-key | Optional. Required only if authentication is enabled. | "sk-..." |
+| x-api-key | Optional. Required only if authentication is enabled. | "$LANGFLOW_API_KEY" |
docs/docs/Get-Started/get-started-quickstart.md (1)

28-38: Missing fenced-code language spec triggers MD040.

Add a language identifier (e.g., bash) after the opening back-ticks to silence markdown-lint and enable syntax highlighting.

-    ```
+    ```bash
📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 0d74474 and 0a83eb0.

📒 Files selected for processing (17)
  • docs/docs/API-Reference/api-build.md (4 hunks)
  • docs/docs/API-Reference/api-files.md (8 hunks)
  • docs/docs/API-Reference/api-flows-run.md (4 hunks)
  • docs/docs/API-Reference/api-flows.md (9 hunks)
  • docs/docs/API-Reference/api-logs.md (2 hunks)
  • docs/docs/API-Reference/api-monitor.md (9 hunks)
  • docs/docs/API-Reference/api-projects.md (8 hunks)
  • docs/docs/API-Reference/api-reference-api-examples.md (2 hunks)
  • docs/docs/API-Reference/api-users.md (1 hunks)
  • docs/docs/Components/components-data.md (1 hunks)
  • docs/docs/Components/components-io.md (3 hunks)
  • docs/docs/Components/components-processing.md (4 hunks)
  • docs/docs/Concepts/concepts-playground.md (2 hunks)
  • docs/docs/Configuration/configuration-api-keys.md (4 hunks)
  • docs/docs/Develop/session-id.md (1 hunks)
  • docs/docs/Develop/webhook.md (1 hunks)
  • docs/docs/Get-Started/get-started-quickstart.md (6 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
`docs/**/*.{md,mdx}`: All documentation content must follow the markdown convent...

docs/**/*.{md,mdx}: All documentation content must follow the markdown conventions outlined, including frontmatter with title, description, and sidebar_position, use of proper headers, admonitions (tip, warning, danger), and code block formatting.
Images should be stored in the 'static/img/' directory and referenced with descriptive alt text in markdown.

📄 Source: CodeRabbit Inference Engine (.cursor/rules/docs_development.mdc)

List of files the instruction was applied to:

  • docs/docs/Concepts/concepts-playground.md
  • docs/docs/Components/components-data.md
  • docs/docs/API-Reference/api-logs.md
  • docs/docs/API-Reference/api-build.md
  • docs/docs/Develop/session-id.md
  • docs/docs/Components/components-io.md
  • docs/docs/Develop/webhook.md
  • docs/docs/API-Reference/api-flows.md
  • docs/docs/Components/components-processing.md
  • docs/docs/API-Reference/api-users.md
  • docs/docs/API-Reference/api-flows-run.md
  • docs/docs/API-Reference/api-monitor.md
  • docs/docs/API-Reference/api-files.md
  • docs/docs/API-Reference/api-reference-api-examples.md
  • docs/docs/API-Reference/api-projects.md
  • docs/docs/Get-Started/get-started-quickstart.md
  • docs/docs/Configuration/configuration-api-keys.md
🪛 Gitleaks (8.26.0)
docs/docs/Get-Started/get-started-quickstart.md

29-32: Discovered a potential authorization token provided in a curl command header, which could compromise the curl accessed resource.

(curl-auth-header)

docs/docs/Configuration/configuration-api-keys.md

86-89: Discovered a potential authorization token provided in a curl command header, which could compromise the curl accessed resource.

(curl-auth-header)

🪛 markdownlint-cli2 (0.17.2)
docs/docs/Get-Started/get-started-quickstart.md

28-28: Fenced code blocks should have a language specified
null

(MD040, fenced-code-language)

🪛 LanguageTool
docs/docs/Configuration/configuration-api-keys.md

[style] ~13-~13: ‘Prior to’ might be wordy. Consider a shorter alternative.
Context: ... Auto-login and API key authentication Prior to Langflow v1.5, when AUTO_LOGIN was en...

(EN_WORDINESS_PREMIUM_PRIOR_TO)

🔇 Additional comments (8)
docs/docs/API-Reference/api-users.md (1)

24-32: Looks good – header added correctly

The x-api-key header is present and uses the $LANGFLOW_API_KEY placeholder consistently.

docs/docs/Components/components-data.md (1)

265-274: Contradiction: header added for a component that “does not require an API key”

Line 265 explicitly states the Webhook component does not require an API key, yet the new example adds the x-api-key header (and without the $ prefix).

Either
a) remove the header from this specific example, or
b) update the text to clarify that the header is optional for webhooks.

If you keep the header, prefix the placeholder with $ for consistency:

-  -H 'x-api-key: LANGFLOW_API_KEY' \
+  # Remove this line *or* make it consistent:
+  #-H "x-api-key: $LANGFLOW_API_KEY" \
docs/docs/API-Reference/api-logs.md (1)

41-43: LGTM – headers added correctly

The new x-api-key header uses $LANGFLOW_API_KEY, matching the convention elsewhere. No further action needed.

Also applies to: 88-90

docs/docs/API-Reference/api-monitor.md (1)

21-23: Consistent authentication examples – looks good

All added snippets correctly include the x-api-key header with $LANGFLOW_API_KEY and keep existing accept headers intact. Good consistency across the document.

Also applies to: 401-403, 422-424, 438-440, 495-496, 575-577, 628-630, 652-654

docs/docs/API-Reference/api-build.md (1)

35-35: Authentication header added correctly

The new x-api-key examples use the $LANGFLOW_API_KEY environment variable and preserve existing header ordering—looks good.

Also applies to: 63-65, 90-91, 142-142

docs/docs/API-Reference/api-files.md (1)

46-47: Consistent header inclusion

All modified snippets now carry -H "x-api-key: $LANGFLOW_API_KEY" in line with the documentation convention. No further action needed.

Also applies to: 76-77, 98-99, 126-128, 153-154, 177-179, 210-212, 265-266, 290-291, 357-358, 381-383, 411-412, 437-438

docs/docs/API-Reference/api-projects.md (1)

23-25: LGTM – projects endpoints now show the required API-key header

The added lines follow the established pattern and are technically correct.

Also applies to: 55-56, 88-89, 113-115, 149-150, 188-190, 212-213, 225-226

docs/docs/API-Reference/api-flows.md (1)

25-26: Header alignment is correct

x-api-key header is now present across all flow-management samples with the $LANGFLOW_API_KEY placeholder. Looks consistent with other docs.

Also applies to: 78-79, 131-133, 166-168, 175-177, 187-188, 204-205, 251-253, 282-283, 319-320

Comment thread docs/docs/Configuration/configuration-api-keys.md
Comment thread docs/docs/Concepts/concepts-playground.md Outdated
Comment thread docs/docs/Components/components-io.md Outdated
Comment thread docs/docs/Get-Started/get-started-quickstart.md
Comment thread docs/docs/Get-Started/get-started-quickstart.md Outdated
Comment thread docs/docs/Get-Started/get-started-quickstart.md
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 25, 2025

Build successful! ✅
Deploying docs draft.
Deploy successful! View draft

@github-actions github-actions Bot added documentation Improvements or additions to documentation and removed documentation Improvements or additions to documentation labels Jun 25, 2025
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 25, 2025

Build successful! ✅
Deploying docs draft.
Deploy successful! View draft

@github-actions github-actions Bot added the documentation Improvements or additions to documentation label Jul 7, 2025
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jul 7, 2025

Build successful! ✅
Deploying docs draft.
Deploy successful! View draft

Co-authored-by: April I. Murphy <36110273+aimurphy@users.noreply.github.com>
@github-actions github-actions Bot added documentation Improvements or additions to documentation and removed documentation Improvements or additions to documentation labels Jul 7, 2025
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jul 7, 2025

Build successful! ✅
Deploying docs draft.
Deploy successful! View draft

@github-actions github-actions Bot added documentation Improvements or additions to documentation and removed documentation Improvements or additions to documentation labels Jul 8, 2025
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jul 8, 2025

Build successful! ✅
Deploying docs draft.
Deploy successful! View draft

Comment thread docs/docs/Concepts/concepts-publish.md Outdated
Comment thread docs/docs/Get-Started/get-started-quickstart.md Outdated
Comment thread docs/docs/API-Reference/api-reference-api-examples.md Outdated
Comment thread docs/docs/Get-Started/get-started-quickstart.md Outdated
Comment thread docs/docs/Configuration/environment-variables.md Outdated
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jul 8, 2025

Build successful! ✅
Deploying docs draft.
Deploy successful! View draft

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jul 8, 2025

Build successful! ✅
Deploying docs draft.
Deploy successful! View draft

Comment thread docs/docs/API-Reference/api-reference-api-examples.md Outdated
Comment thread docs/docs/Configuration/configuration-api-keys.md Outdated
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jul 8, 2025

Build successful! ✅
Deploying docs draft.
Deploy successful! View draft

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jul 10, 2025

Build successful! ✅
Deploying docs draft.
Deploy successful! View draft

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation lgtm This PR has been approved by a maintainer size:XL This PR changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants