remove-gerunds-in-titles

This commit is contained in:
Mendon Kissling 2024-06-07 15:43:53 -04:00
commit 36e298a7df
6 changed files with 37 additions and 19 deletions

View file

@ -14,9 +14,9 @@ The default values are `langflow` and `langflow`, respectively.
</Admonition>
## Generating an API Key
## Generate an API Key
### Through Langflow UI
### With Langflow UI
<ZoomableImage
alt="Docusaurus themed image"
@ -33,9 +33,27 @@ The default values are `langflow` and `langflow`, respectively.
4. Click on "Create secret key".
5. Copy the API key and store it in a secure location.
## Using the API Key
### With Langflow CLI
### Using the `x-api-key` Header
```bash
langflow api-key
# or
python -m langflow api-key
╭─────────────────────────────────────────────────────────────────────╮
│ API Key Created Successfully: │
│ │
│ sk-O0elzoWID1izAH8RUKrnnvyyMwIzHi2Wk-uXWoNJ2Ro │
│ │
│ This is the only time the API key will be displayed. │
│ Make sure to store it in a secure location. │
│ │
│ The API key has been copied to your clipboard. Cmd + V to paste it. │
╰──────────────────────────────
```
## Use the API Key
### Use the `x-api-key` Header
Include the `x-api-key` in the HTTP header when making API requests:
@ -90,7 +108,7 @@ api_key = "<your api key>"
print(run_flow(inputs, flow_id=FLOW_ID, tweaks=TWEAKS, apiKey=api_key))
```
### Using the Query Parameter
### Use the Query Parameter
Include the API key as a query parameter in the URL:
@ -101,7 +119,7 @@ curl -X POST \
-d '{"inputs": {"text":""}, "tweaks": {}}'
```
Or with Python:
With Python using `requests`:
```python
import requests
@ -148,6 +166,6 @@ print(run_flow(inputs, flow_id=FLOW_ID, tweaks=TWEAKS, apiKey=api_key))
- **Visibility**: For security reasons, the API key cannot be retrieved again through the UI.
- **Scope**: The key allows access only to the flows and components of the specific user to whom it was issued.
## Revoking an API Key
## Revoke an API Key
To revoke an API key, delete it from the UI. This action immediately invalidates the key and prevents it from being used again.