API Reference.
Complete reference for the PromptOT public API. Authenticate with API keys, fetch compiled prompts, and integrate with your application.
Authentication
Authenticate requests using API keys passed in the Authorization header as a Bearer token. Keys are scoped to environments:
- Production keys (
pk_live_*) return the published version of your prompt. - Development keys (
pk_dev_*) return the latest draft.
Base URL
All API requests are made to the following base URL:
Available endpoints.
Fetch a compiled prompt with variables resolved. Returns the full prompt string assembled from all enabled blocks.
slug(path)requiredThe prompt's URL slugvariables(query)JSON object of variable key-value pairsList all prompts in the project associated with the API key.
Error Handling
All errors follow a consistent envelope format. The data field will be null and the error object will contain a code and message.
Common Error Codes
| Status | Code | Description |
|---|---|---|
| 401 | UNAUTHORIZED | Missing or invalid API key |
| 404 | NOT_FOUND | Requested resource does not exist |
| 400 | VALIDATION_ERROR | Request parameters failed validation |
| 429 | RATE_LIMITED | Too many requests, slow down |
| 500 | INTERNAL_ERROR | Unexpected server error |
Rate Limits
API rate limits are based on your plan. Exceeding the limit returns a RATE_LIMITED error.
Free
Pro
Enterprise
Versioning & Stability
The PromptOT public API follows a strict versioning policy to ensure your integrations remain stable.
Frozen response shape
The GET /v1/prompts/:id delivery endpoint returns a stable response shape that will not change within the v1 API.
| Field | Description |
|---|---|
id | Prompt UUID |
name | Prompt display name |
compiled_prompt | Full compiled prompt string with variables resolved |
model_config | Model configuration snapshot (model, temperature, etc.) |
variables[].key | Variable key name |
variables[].default_value | Variable default value |
version | Version number (integer) |
etag | ETag for conditional requests (If-None-Match) |
Deprecation policy
- Additive changes (new optional fields) may be added to v1 responses at any time. These are not breaking changes.
- Breaking changes (removing or renaming fields, changing types) will only happen in a new API version (e.g., /api/v2).
- Deprecation window — when a new version is released, the previous version will continue to work for at least 6 months with a
Sunsetheader indicating the retirement date. - ETag support — use
If-None-Matchto avoid re-fetching unchanged prompts. A 304 response means the cached version is still current.
Ready to integrate?
Create your first prompt and start fetching compiled prompts via the API in minutes.