REST API

Access your structured prompts via HTTP requests to our REST API. All sections are combined and ready to send to any AI provider.

Base URL

All API requests should be made to:

https://superprompts.app/api/v1

Authentication

All requests require authentication using your project's API key in the request headers:

x-api-key: <YOUR_API_KEY>

Getting Your API Key: Navigate to your project settings in the dashboard to view your API key.

Get Prompt

Retrieve a specific prompt with all sections combined.

Request

curl https://superprompts.app/api/v1/prompts/<PROMPT_ID> \
  -H "x-api-key: <API_KEY>"

Response

{
  "id": "my-prompt",
  "content": "[All 7 sections combined in optimal order]",
  "sections": [
    {
      "id": "task-context",
      "title": "1. Task context",
      "content": "..."
    },
    {
      "id": "tone-context",
      "title": "2. Tone context",
      "content": "..."
    },
    // ... all 7 sections
  ],
  "version": "1.0.0",
  "created_at": "2024-01-01T00:00:00Z",
  "updated_at": "2024-01-01T00:00:00Z"
}

Response Fields

idstring

The unique identifier for the prompt

contentstring

All 7 sections combined in optimal order, ready to use with AI providers

sectionsarray

Individual sections with their IDs, titles, and content

versionstring

The current version number

created_atstring

ISO 8601 timestamp of creation

updated_atstring

ISO 8601 timestamp of last update

Error Responses

401 Unauthorized

Invalid or missing API key

{
  "error": "Invalid API key"
}
404 Not Found

Prompt not found

{
  "error": "Prompt not found"
}
500 Internal Server Error

Server error

{
  "error": "Internal server error"
}

Next Steps