flash deploy, you can call your endpoints directly via HTTP. The request format depends on whether you’re using queue-based or load-balanced configurations.
Authentication
All deployed endpoints require authentication with your Runpod API key:Queue-based endpoints
Queue-based endpoints (using@Endpoint(name=..., gpu=...) decorator) provide two routes for job submission: /run (asynchronous) and /runsync (synchronous).
Asynchronous calls (/run)
Submit a job and receive a job ID for later status checking:
Synchronous calls (/runsync)
Wait for job completion and receive results directly (with timeout):
/runsync endpoint has a 60-second client-side timeout by default. If you’ve configured execution_timeout_ms on your endpoint, the client timeout uses that value instead. For jobs that take longer than 60 seconds, set execution_timeout_ms to prevent /runsync requests from timing out.
Queue-based request format
Queue-based endpoints expect input wrapped in an{"input": {...}} object:
"input" depends on your @Endpoint function signature.
Job status states
| Status | Description |
|---|---|
IN_QUEUE | Waiting for an available worker |
IN_PROGRESS | Worker is executing your function |
COMPLETED | Function finished successfully |
FAILED | Execution encountered an error |
Load-balanced endpoints
Load-balanced endpoints (usingapi = Endpoint(...); @api.post("/path") pattern) provide custom HTTP routes with direct request/response patterns.
Calling load-balanced routes
All routes share the same base URL. Append the route path to call specific functions:Load-balanced request format
Load-balanced endpoints accept direct JSON payloads (no{"input": {...}} wrapper):
Multiple routes, single endpoint
A single load-balanced endpoint can serve multiple routes:Quick reference
| Endpoint Type | Routes | Request Format | Response |
|---|---|---|---|
| Queue-based | /run, /runsync, /status/{id} | {"input": {...}} | Job ID (async) or result (sync) |
| Load-balanced | Custom paths (e.g., /process) | Direct JSON payload | Direct response |
Response status codes
| Code | Meaning |
|---|---|
200 | Success (load-balanced) or job accepted (queue-based) |
400 | Bad request (invalid input format) |
401 | Unauthorized (invalid or missing API key) |
404 | Route not found |
500 | Internal server error |
Error handling
Queue-based errors appear in the job output:Using SDKs
For programmatic access, use the Runpod Python SDK:Next steps
Deploy apps
Deploy your Flash app to get endpoint URLs.
Configuration reference
View all endpoint configuration parameters.
Runpod SDK
Use the Python SDK for programmatic access.