Skip to content

Public REST API

Promptodex exposes a small, read-only HTTP API at /api/v1/* for fetching prompts and collections programmatically. It's designed for agents, scripts, and external tools that need to pull prompt content without the CLI or SDK.

Prefer the SDK

If you're working in JavaScript or TypeScript, the promptodex SDK wraps this API with rendering, types, and convenience helpers. Use the raw API when you're in another language or need full control over the HTTP layer.

Base URL

https://promptodex.com/api/v1

Authentication

ResourceAuth required
Public promptsNone
Public collectionsNone
Private promptsAuthorization: Bearer POD_live_xxx
Private collectionsAuthorization: Bearer POD_live_xxx

API keys are generated on the /account page. Only the resource owner's API key can access their private prompts or collections.

Rate limits

  • 60 requests per minute per IP address or API key

Every response includes rate limit headers:

HeaderDescription
X-RateLimit-RemainingRequests left in the current window
X-RateLimit-ResetUnix timestamp when the window resets

A 429 Too Many Requests is returned when the limit is exceeded.

Error responses

StatusMeaningBody
401Missing or invalid API key for a private resource{}
404Resource not found or not accessible{}
429Rate limit exceeded{}

All errors return an empty JSON object. The HTTP status code is authoritative.


Prompts

Get latest prompt

http
GET /api/v1/prompts/{slug}

Returns the latest version of a prompt.

Example

http
GET /api/v1/prompts/summarize HTTP/1.1
Host: promptodex.com
Accept: application/json
Authorization: Bearer POD_live_abc123   # only for private prompts

Response — 200 OK

json
{
  "slug": "my-prompt-slug",
  "description": "A short description of the prompt.",
  "content": "Hello, {{name}}!",
  "variables": [
    { "name": "name", "defaultValue": "world", "required": true }
  ],
  "author": "johndoe",
  "model": {
    "id": "gpt-4",
    "name": "gpt-4",
    "provider": "openai"
  },
  "modelSettings": {
    "temperature": 0.7,
    "topP": 1,
    "maxTokens": 2048
  },
  "tags": ["writing", "productivity"],
  "version": 3,
  "latestVersion": 3,
  "isPrivate": false,
  "createdAt": "2026-04-01T12:00:00.000Z",
  "updatedAt": "2026-04-10T15:30:00.000Z"
}

Get a specific prompt version

http
GET /api/v1/prompts/{slug}/{version}

Version numbers are 1-indexed (1 = first published version).

The response shape matches the latest-prompt endpoint, but replaces updatedAt with:

FieldTypeDescription
commitMessagestringAuthor's note for this version
versionCreatedAtstring (ISO)When this version was published

Response fields

FieldTypeDescription
slugstringUnique prompt identifier
descriptionstringShort author-provided description
contentstringRaw prompt template (with {{variable}} placeholders)
variablesVariable[]Declared variables with defaults and required flags
authorstringAuthor's username
modelModel | undefinedRecommended model identity — only present when set
modelSettingsModelSettings | undefinedRecommended model parameters — only present when set
tagsstring[]Category and discovery tags
versionnumberVersion returned by this response
latestVersionnumberMost recent published version
isPrivatebooleantrue if the prompt is private
createdAtstringISO timestamp when the prompt was first created
updatedAtstring(Latest endpoint) ISO timestamp of most recent update
commitMessagestring(Versioned endpoint) Commit message for this version
versionCreatedAtstring(Versioned endpoint) ISO timestamp of this version

ModelSettings may contain any of: temperature, topP, maxTokens, frequencyPenalty, presencePenalty.


Collections

Get collection by slug

http
GET /api/v1/collections/{slug}

Returns a collection's metadata and the prompts it contains.

No list endpoint

Collections can only be fetched by slug. There is no endpoint to list all collections.

Private collections require the owner's API key in the Authorization header.

Response — 200 OK

json
{
  "slug": "my-collection",
  "name": "My Collection",
  "description": "A set of useful prompts.",
  "author": "johndoe",
  "isPrivate": false,
  "itemCount": 2,
  "items": {
    "my-prompt-slug": 2,
    "another-prompt-slug": ""
  },
  "createdAt": "2026-04-01T12:00:00.000Z",
  "updatedAt": "2026-04-10T15:30:00.000Z"
}

items map

The items object maps each prompt slug to its pin state:

ValueMeaning
A version number (e.g. 2)Collection is pinned to that specific version
Empty string ""Collection always resolves to the latest version

To fetch the actual prompt content, call GET /api/v1/prompts/{slug} (unpinned) or GET /api/v1/prompts/{slug}/{version} (pinned) for each entry.

See Collections for the concept overview.


Notes

  • Slugs are unique and immutable.
  • The API is read-only — prompt and collection creation/editing happen through the Promptodex website.
  • All timestamps are ISO 8601 strings.
  • isPrivate is consistent across both prompt and collection endpoints: false = public, true = private.

Next Steps

Released under the MIT License.