Skip to main content
The flash dev command starts a local development server that lets you test your Flash application before deploying to production. The development server runs locally and updates automatically as you edit files. When you call a @Endpoint function, Flash sends the latest function code to Serverless workers on Runpod, so your changes are reflected immediately.

Start the development server

From inside your project directory, run:
The server starts at http://localhost:8888 by default. Your endpoints are available immediately for testing, and @Endpoint functions provision Serverless endpoints on first call.

Using a custom host and port

Test your endpoints

Using curl

Queue-based endpoints require the {"input": {...}} wrapper to match the deployed endpoint behavior. The inner payload structure maps to your function’s parameter names—the skeleton template uses input_data: dict, so the payload is {"input_data": {...}}. Load-balanced endpoints accept the payload directly without the input wrapper.

Using the API explorer

Open http://localhost:8888/docs in your browser to access the interactive Swagger UI. You can test all endpoints directly from the browser. Flash extracts the first line of each function’s docstring and displays it as the endpoint description in the API explorer. Add docstrings to your @Endpoint functions to make your API self-documenting:
The docstring “Process input data and return computed results” appears in the Swagger UI, making it easier to understand what each endpoint does.

Using Python

Reduce cold-start delays

The first call to a @Endpoint function provisions a Serverless endpoint, which takes 30-60 seconds. Use --auto-provision to provision all endpoints at startup:
This scans your project for @Endpoint functions and deploys them before the server starts accepting requests. Endpoints are cached in .flash/resources.pkl and reused across server restarts.

How it works

With flash dev, Flash starts a local development server alongside remote Serverless endpoints: What runs where:
ComponentLocation
Development serverYour machine (localhost:8888)
@Endpoint function codeRunpod Serverless
Endpoint storageRunpod Serverless
Your code updates automatically as you edit files. Endpoints created by flash dev are prefixed with live- to distinguish them from production endpoints.

Clean up after testing

Endpoints created by flash dev persist until you delete them. To clean up:

Troubleshooting

Port already in use Flash automatically selects the next available port if your specified port is in use. You’ll see a message like Port 8888 is in use, using 8889 instead. If you need a specific port, stop the process using it or specify a different starting port with --port. Slow first request Use --auto-provision to eliminate cold-start delays:
Authentication errors Run flash login to authenticate:
Alternatively, set RUNPOD_API_KEY as an environment variable or in your .env file:
Values in your .env file are only available locally for CLI commands. They are not passed to deployed endpoints.

Next steps