Below is an overview of Sysprompt’s public API—an alternative to using the SDK for creating and managing prompts or retrieving prompt logs. All requests require an API Key passed in the request header, ensuring secure access to your Sysprompt data.
To authenticate, include your API Key in the header as X-PROJECT-KEY
. For example:
curl -H "X-PROJECT-KEY: your-api-key-here" https://api.sysprompt.com/endpoint
You can generate or view your API Key in your Sysprompt account settings.
POST /v1/sdk/logs/prompt/
Example (cURL):
curl -X POST https://api.sysprompt.com/v1/sdk/logs/prompt/ \
-H "X-PROJECT-KEY: your-api-key-here" \
-d '{
"prompt_code": "untitled_T1iqKwGtIvpw",
"executed_at": "2025-01-15T10:00:00Z",
"additional_data": "Your custom log info"
}'
GET /v1/sdk/prompts/
code_id
, name, creation date).
Example (cURL):
curl -X GET https://api.sysprompt.com/v1/sdk/prompts/ \
-H "X-PROJECT-KEY: your-api-key-here"
POST /v1/sdk/prompts/
Example (cURL):
curl -X POST https://api.sysprompt.com/v1/sdk/prompts \
-H "X-PROJECT-KEY: your-api-key-here" \
-d '{
"name": "NewPromptTitle",
"content": "Your prompt text here with {{variables}} if needed."
}'
GET /v1/sdk/prompts/{code_id}/
code_id
.
Example (cURL):
curl -X GET https://api.sysprompt.com/v1/sdk/prompts/untitled_T1iqKwGtIvpw/ \
-H "X-PROJECT-KEY: your-api-key-here"
GET /v1/sdk/prompts/{code_id}/
code_id
.
Example (cURL):
curl -X GET https://api.sysprompt.com/v1/sdk/prompts/untitled_T1iqKwGtIvpw/ \
-H "X-PROJECT-KEY: your-api-key-here"
Working with the Sysprompt API effectively involves a few key considerations to ensure security, reliability, and maintainability. Below are some best practices to keep in mind:
X-PROJECT-KEY
as a secret; never expose it in client-side code or public repositories./v1/sdk/...
). Always use the latest stable path to avoid compatibility issues.{{variable_name}}
, pass them correctly in your JSON. This ensures your prompts remain flexible and dynamic.