From b1d3796cbe4e97b941eeb9cc18200ea8e83d0c13 Mon Sep 17 00:00:00 2001 From: "promptless[bot]" <179508745+promptless[bot]@users.noreply.github.com> Date: Thu, 19 Feb 2026 14:57:28 +0000 Subject: [PATCH 1/3] Move API key setup to top of text-to-video pipeline tutorial --- tutorials/public-endpoints/text-to-video-pipeline.mdx | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/tutorials/public-endpoints/text-to-video-pipeline.mdx b/tutorials/public-endpoints/text-to-video-pipeline.mdx index 22e9633b..a4c27442 100644 --- a/tutorials/public-endpoints/text-to-video-pipeline.mdx +++ b/tutorials/public-endpoints/text-to-video-pipeline.mdx @@ -60,13 +60,14 @@ flowchart TD ## Step 1: Set up your project -Create a new directory for your project with a virtual environment. +Create a new directory for your project with a virtual environment and set your API key. ```bash mkdir text-to-video && cd text-to-video python3 -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate pip install requests +export RUNPOD_API_KEY="your-api-key" ``` Create a new file called `pipeline.py` and add the following imports and configuration: @@ -483,11 +484,9 @@ if __name__ == "__main__": ## Run the pipeline -Activate your virtual environment, set your API key, and run the script: +Run the script: ```bash -source venv/bin/activate # On Windows: venv\Scripts\activate -export RUNPOD_API_KEY="your-api-key" python pipeline.py ``` From ba1d90b1e597f5cac5ecc401489f6ff4cbfd824b Mon Sep 17 00:00:00 2001 From: Mo King Date: Thu, 19 Feb 2026 10:11:45 -0500 Subject: [PATCH 2/3] Improve PE tutorial --- .../text-to-video-pipeline.mdx | 25 +++++++++++++------ 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/tutorials/public-endpoints/text-to-video-pipeline.mdx b/tutorials/public-endpoints/text-to-video-pipeline.mdx index a4c27442..3db75896 100644 --- a/tutorials/public-endpoints/text-to-video-pipeline.mdx +++ b/tutorials/public-endpoints/text-to-video-pipeline.mdx @@ -5,7 +5,7 @@ description: "Chain multiple Public Endpoints to generate videos from text promp tag: "NEW" --- -This tutorial shows you how to build a complete text-to-video pipeline by chaining three Runpod [Public Endpoints](/public-endpoints/overview) together. You'll take a simple text idea and transform it into an animated video, all with a single Python script. +This tutorial shows you how to build a complete text-to-video pipeline by chaining three Runpod [Public Endpoints](/public-endpoints/overview) together. You'll take a simple idea and transform it into an animated video, all with a single Python script. @@ -45,12 +45,16 @@ flowchart TD ## Requirements -- A [Runpod account](/get-started/manage-accounts) with at least \$1 in credits -- A [Runpod API key](/get-started/api-keys) -- Python 3.8 or later +Before you begin, you'll need: + +- A [Runpod account](/get-started/manage-accounts) with at least \$1 in credits. +- A [Runpod API key](/get-started/api-keys). +- Python 3.8 or later installed on your local machine. ## Estimated cost +Public Endpoints pricing is based on actual usage. Here's an estimated cost for running the pipeline based on the models used: + | Step | Model | Cost | |------|-------|------| | Prompt enhancement | Qwen3 32B | ~\$0.01 | @@ -58,16 +62,18 @@ flowchart TD | Video generation | WAN 2.5 | ~\$0.25 | | **Total** | | **~\$0.26** | +You won't be charged for failed generations. + ## Step 1: Set up your project -Create a new directory for your project with a virtual environment and set your API key. +Create a new directory for your project with a virtual environment and set your API key. Replace `YOUR_API_KEY` with your actual API key. ```bash mkdir text-to-video && cd text-to-video python3 -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate pip install requests -export RUNPOD_API_KEY="your-api-key" +export RUNPOD_API_KEY="YOUR_API_KEY" ``` Create a new file called `pipeline.py` and add the following imports and configuration: @@ -237,7 +243,7 @@ def generate_video(image_url, prompt): job_id = result["id"] print(f" Job submitted: {job_id}") - # Poll for completion (video takes longer, so increase timeout) + # Poll for completion (video takes longer, so we'll increase the timeout) status = poll_for_completion(WAN_ENDPOINT, job_id, timeout=600) video_url = status["output"]["result"] print(f" Video URL: {video_url}") @@ -301,8 +307,9 @@ if __name__ == "__main__": ## Full code -Here's the complete script: +Expand the section below to see the full `pipeline.py` code: + ```python import requests import time @@ -481,6 +488,8 @@ if __name__ == "__main__": exit(1) main() ``` + + ## Run the pipeline From d107ed33ea08762633ef0de56310f5543d69018a Mon Sep 17 00:00:00 2001 From: Mo King Date: Thu, 19 Feb 2026 10:21:04 -0500 Subject: [PATCH 3/3] Update export API key format for consistency --- .../runpod-network-volume-storage-tool.mdx | 6 +++--- public-endpoints/ai-sdk.mdx | 4 ++-- tutorials/serverless/run-gemma-7b.mdx | 8 +++++--- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/community-solutions/runpod-network-volume-storage-tool.mdx b/community-solutions/runpod-network-volume-storage-tool.mdx index d1e948dc..806ca3c6 100644 --- a/community-solutions/runpod-network-volume-storage-tool.mdx +++ b/community-solutions/runpod-network-volume-storage-tool.mdx @@ -32,9 +32,9 @@ uv sync Set your API credentials as environment variables: ```bash -export RUNPOD_API_KEY="your_runpod_api_key" -export RUNPOD_S3_ACCESS_KEY="your_s3_access_key" -export RUNPOD_S3_SECRET_KEY="your_s3_secret_key" +export RUNPOD_API_KEY="YOUR_RUNPOD_API_KEY" +export RUNPOD_S3_ACCESS_KEY="YOUR_S3_ACCESS_KEY" +export RUNPOD_S3_SECRET_KEY="YOUR_S3_SECRET_KEY" ``` ## Interactive mode diff --git a/public-endpoints/ai-sdk.mdx b/public-endpoints/ai-sdk.mdx index 0f104c88..9bede559 100644 --- a/public-endpoints/ai-sdk.mdx +++ b/public-endpoints/ai-sdk.mdx @@ -38,7 +38,7 @@ import { runpod } from "@runpod/ai-sdk-provider"; Set the environment variable in your shell or `.env` file: ```bash -export RUNPOD_API_KEY="your-api-key" +export RUNPOD_API_KEY="YOUR_API_KEY" ``` ### Custom configuration @@ -49,7 +49,7 @@ For more control, use `createRunpod` to create a custom provider instance: import { createRunpod } from "@runpod/ai-sdk-provider"; const runpod = createRunpod({ - apiKey: "your-api-key", + apiKey: "YOUR_API_KEY", baseURL: "https://api.runpod.ai/v2", headers: { "X-Custom-Header": "value", diff --git a/tutorials/serverless/run-gemma-7b.mdx b/tutorials/serverless/run-gemma-7b.mdx index aa7af9f7..f5b9887a 100644 --- a/tutorials/serverless/run-gemma-7b.mdx +++ b/tutorials/serverless/run-gemma-7b.mdx @@ -177,15 +177,17 @@ if __name__ == "__main__": main() ``` -Before running the script, install the OpenAI Python client and set your environment variables: +Before running the script, install the OpenAI Python client and set your environment variables. ```bash pip install openai ``` +Replace `YOUR_RUNPOD_API_KEY` and `YOUR_ENDPOINT_ID` with your actual API key and endpoint ID: + ```bash -export RUNPOD_API_KEY="your_runpod_api_key" -export RUNPOD_ENDPOINT_ID="your_endpoint_id" +export RUNPOD_API_KEY="YOUR_RUNPOD_API_KEY" +export RUNPOD_ENDPOINT_ID="YOUR_ENDPOINT_ID" ``` Run your chatbot script: