From 05c4a314e34b9c0974bfb034d1089256cb4335a5 Mon Sep 17 00:00:00 2001 From: Hailong Yang Date: Tue, 8 Apr 2025 16:27:44 -0400 Subject: [PATCH 1/2] feat: doc for sls retry --- docs/serverless/endpoints/job-operations.md | 38 +++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/docs/serverless/endpoints/job-operations.md b/docs/serverless/endpoints/job-operations.md index 36455330..7e8c1afd 100644 --- a/docs/serverless/endpoints/job-operations.md +++ b/docs/serverless/endpoints/job-operations.md @@ -211,6 +211,38 @@ curl -X POST https://api.runpod.ai/v2/{endpoint_id}/status/{job_id} \ +## Retry a Job + +To retry a job that has failed or encountered an error, send a POST request to `/retry/{job_id}` with the Job ID. +The system will automatically requeue and retry the job. + +- You can retry any job with a `FAILED` or `TIMED_OUT` status, as long as the job hasn’t expired. +- Jobs submitted via `/run` expire 30 minutes after completion. +- Jobs submitted via `/runsync` expire 1 minute after completion. +- When a job is retried, the previous output is removed. If you call `/status` right after the retry, it will return no output until the new job run is complete. + + + + +```bash +curl -X POST https://api.runpod.ai/v2/{endpoint_id}/retry/{job_id} \ + -H 'Authorization: Bearer ${API_KEY}' +``` + + + + + +```json +{ + "id": "60902e6c-08a1-426e-9cb9-9eaec90f5e2b-u1", + "status": "IN_QUEUE" +} +``` + + + + ## Stream results For jobs that produce output incrementally, the stream endpoint allows you to receive results as they are generated. @@ -270,21 +302,27 @@ RunPod's Endpoints facilitate submitting jobs and retrieving outputs. Access these endpoints at: `https://api.runpod.ai/v2/{endpoint_id}/{operation}` - `/run` + - 1000 requests per 10 seconds, 200 concurrent - `/runsync` + - 2000 requests per 10 seconds, 400 concurrent - `/status`, `/status-sync`, `/stream` + - 2000 requests per 10 seconds, 400 concurrent - `/cancel` + - 100 requests per 10 seconds, 20 concurrent - `/purge-queue` + - 2 requests per 10 seconds - `/openai/*` + - 2000 requests per 10 seconds, 400 concurrent - `/requests` From a5c81c096822e3270f77e024f2e9649464098c6f Mon Sep 17 00:00:00 2001 From: Hailong Yang Date: Tue, 8 Apr 2025 18:07:03 -0400 Subject: [PATCH 2/2] fix: case --- docs/serverless/endpoints/job-operations.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/serverless/endpoints/job-operations.md b/docs/serverless/endpoints/job-operations.md index 7e8c1afd..6316a951 100644 --- a/docs/serverless/endpoints/job-operations.md +++ b/docs/serverless/endpoints/job-operations.md @@ -211,7 +211,7 @@ curl -X POST https://api.runpod.ai/v2/{endpoint_id}/status/{job_id} \ -## Retry a Job +## Retry a job To retry a job that has failed or encountered an error, send a POST request to `/retry/{job_id}` with the Job ID. The system will automatically requeue and retry the job.