Skip to main content
GET
/
v1
/
prompts
/
:owner
/
:name
/
versions
/
:version
/
download
Download Version
curl --request GET \
  --url https://api.example.com/v1/prompts/:owner/:name/versions/:version/download
{
  "404 Not Found (Prompt)": {},
  "404 Not Found (Version)": {},
  "500 Internal Server Error": {}
}

Overview

Download a tarball for a specific version of a prompt. This endpoint returns a 302 redirect to a presigned URL for the tarball stored in object storage (R2/S3). The presigned URL is valid for 15 minutes.

Authentication

This endpoint does not require authentication for public prompts.

Request

Path Parameters

owner
string
required
The username or identifier of the prompt owner
name
string
required
The name of the prompt
version
string
required
The semantic version number to download (e.g., 1.0.0, 2.3.15)

Response

This endpoint responds with a 302 Found redirect to a presigned URL where the tarball can be downloaded.

Redirect Flow

1

Initial Request

Make a GET request to the download endpoint
2

302 Redirect

The server responds with a 302 redirect to a presigned S3/R2 URL
3

Download Tarball

Follow the redirect to download the .tar.gz file directly from object storage

Presigned URL Properties

  • Expiration: 15 minutes from generation
  • Content-Type: application/gzip
  • File Format: .tar.gz (gzip-compressed tarball)

Examples

curl -L https://api.prompts.dev/v1/prompts/alice/code-review/versions/1.0.0/download \
  -o code-review-1.0.0.tar.gz

Redirect Response

302 Found
HTTP/1.1 302 Found
Location: https://r2.cloudflare.com/bucket/alice/code-review/1.0.0.tar.gz?X-Amz-Signature=...
Content-Length: 0

Error Responses

404 Not Found (Prompt)
error
Prompt with the specified owner and name does not exist
{
  "error": "NOT_FOUND",
  "message": "prompt not found"
}
404 Not Found (Version)
error
Version does not exist for this prompt
{
  "error": "NOT_FOUND",
  "message": "version not found"
}
500 Internal Server Error
error
Failed to generate presigned URL
{
  "error": "INTERNAL_ERROR",
  "message": "failed to generate download url"
}

Notes

Follow Redirects: Make sure your HTTP client is configured to follow redirects (e.g., use the -L flag with curl).
Download Tracking: Each successful download (redirect generation) is tracked and recorded in the database for analytics purposes.
URL Expiration: The presigned URL expires after 15 minutes. If the URL expires, make a new request to the download endpoint to get a fresh URL.
Direct Storage Access: The redirect points directly to object storage (R2/S3), ensuring fast download speeds without proxying through the API server.

Build docs developers (and LLMs) love