{"openapi":"3.1.0","info":{"title":"Prompier REST API","description":"Read access to your team's prompts and to the app results your team shares, and (with a key that has the `run:apps` scope) running your live apps. Authenticate with `Authorization: Bearer <key>`; create keys in Settings > API keys. Errors look like `{\"error\": {\"code\": \"...\", \"message\": \"...\"}}`. Documentation: /docs.","version":"1.0.0"},"paths":{"/me":{"get":{"tags":["prompts"],"summary":"Check a key","description":"Which workspace and access this key has. No prompt data.","operationId":"me_me_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/prompts":{"get":{"tags":["prompts"],"summary":"List prompts","operationId":"list_prompts_prompts_get","parameters":[{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Q"}},{"name":"kind","in":"query","required":false,"schema":{"enum":["prompt","skill","all"],"type":"string","default":"prompt","title":"Kind"}},{"name":"folder","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Folder"}},{"name":"tag","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}],"title":"Tag"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}],"title":"Status"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":25,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Cursor"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/prompts/{ref}":{"get":{"tags":["prompts"],"summary":"Get a prompt","operationId":"get_prompt_prompts__ref__get","parameters":[{"name":"ref","in":"path","required":true,"schema":{"type":"string","title":"Ref"}},{"name":"label","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"title":"Label"}},{"name":"version","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","minimum":1},{"type":"null"}],"title":"Version"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/prompts/{ref}/render":{"post":{"tags":["prompts"],"summary":"Render a prompt","description":"Fills the variables and returns the final text. Changes nothing.","operationId":"render_prompt_prompts__ref__render_post","parameters":[{"name":"ref","in":"path","required":true,"schema":{"type":"string","title":"Ref"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RenderIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/prompts/{ref}/skill.md":{"get":{"tags":["prompts"],"summary":"Get a skill as SKILL.md","description":"The skill as a SKILL.md file (name and description, then the instructions). The approved version by default.","operationId":"get_skill_file_prompts__ref__skill_md_get","parameters":[{"name":"ref","in":"path","required":true,"schema":{"type":"string","title":"Ref"}},{"name":"label","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"title":"Label"}},{"name":"version","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","minimum":1},{"type":"null"}],"title":"Version"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/prompts/{ref}/versions":{"get":{"tags":["prompts"],"summary":"List versions","description":"Newest first. A key that reads approved prompts only sees just the approved version.","operationId":"list_versions_prompts__ref__versions_get","parameters":[{"name":"ref","in":"path","required":true,"schema":{"type":"string","title":"Ref"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/apps":{"get":{"tags":["apps"],"summary":"List Apps","description":"Published apps: id, slug, name, description and what their results look like.","operationId":"list_apps_apps_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/apps/{app}/results":{"get":{"tags":["apps"],"summary":"List Results","description":"Team results of an app, newest first. `cursor` (a response's `next_cursor`) pages to older ones; `since` (a response's `latest_cursor`, or an\nISO timestamp) returns only results shared after that point, so a script can poll for new ones.","operationId":"list_results_apps__app__results_get","parameters":[{"name":"app","in":"path","required":true,"schema":{"type":"string","title":"App"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}},{"name":"since","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Since"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/apps/{app}/results/latest":{"get":{"tags":["apps"],"summary":"Latest Result","description":"The newest team result in full (saves a second call).","operationId":"latest_result_apps__app__results_latest_get","parameters":[{"name":"app","in":"path","required":true,"schema":{"type":"string","title":"App"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/results/{id}":{"get":{"tags":["apps"],"summary":"Get Result","description":"One result in full: per step its type, format, validity, and `data` (parsed JSON), `content` (text) or `columns` and `rows` (a table).\nAn answer that was not valid for its format is still returned as raw `content` with `valid: false`.","operationId":"get_result_results__id__get","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","title":"Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/results/{id}/output":{"get":{"tags":["apps"],"summary":"Get Output","description":"Just the output with its real Content-Type and a file name. `step` is the step number from `GET /v1/results/{id}` (default: the last one\nshown). `format` converts only where nothing is lost: a table as csv, json or xlsx; a document as docx or pdf (on your letterhead).","operationId":"get_output_results__id__output_get","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","title":"Id"}},{"name":"step","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":15,"minimum":1},{"type":"null"}],"title":"Step"}},{"name":"format","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":8},{"type":"null"}],"title":"Format"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/apps/{app}/runs":{"post":{"tags":["runs"],"summary":"Start an app run","description":"Start a run of a live app. Body `{\"inputs\": {field name: value}}`; header `Idempotency-Key` (optional, recommended: the same key with the\nsame body returns the first run instead of starting another). Answers 202 with the run id; poll `GET /v1/runs/{id}`.","operationId":"start_run_apps__app__runs_post","parameters":[{"name":"app","in":"path","required":true,"schema":{"type":"string","title":"App"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Up to 200 characters. The same key with the same body returns the first run (200) instead of starting another.","title":"Idempotency-Key"},"description":"Up to 200 characters. The same key with the same body returns the first run (200) instead of starting another."},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"inputs":{"type":"object","description":"The answers, by the name of each form field of the app. Text or numbers.","additionalProperties":{"oneOf":[{"type":"string"},{"type":"number"},{"type":"null"}]}}},"example":{"inputs":{"topic":"Q3 plan"}}}}}}}},"/runs/{id}":{"get":{"tags":["runs"],"summary":"Get a run","description":"A run this key started: `status` (queued, running, done, error), `cost`, `error` when it failed and `outputs` once it has ended (a failed run\nkeeps what its earlier steps wrote). Never the inputs.","operationId":"get_run_runs__id__get","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","title":"Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/runs/{id}/output":{"get":{"tags":["runs"],"summary":"Download a run's output","description":"One step's output of a finished run as a file: the same steps and formats as `GET /v1/results/{id}/output`.","operationId":"get_run_output_runs__id__output_get","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","title":"Id"}},{"name":"step","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":15,"minimum":1},{"type":"null"}],"title":"Step"}},{"name":"format","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":8},{"type":"null"}],"title":"Format"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"RenderIn":{"properties":{"values":{"additionalProperties":{"type":"string"},"type":"object","title":"Values","default":{}},"version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Version"},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"}},"type":"object","title":"RenderIn"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"servers":[{"url":"/v1"}]}