{"openapi":"3.1.0","info":{"title":"Runpile API","version":"1.0.0","description":"Publish, search, inspect, and compare reproducible LLM benchmark evidence."},"servers":[{"url":"https://runpile.com","description":"Production"}],"tags":[{"name":"Publishers"},{"name":"Experiments"},{"name":"Runs"},{"name":"Comparisons"},{"name":"Moderation"}],"paths":{"/api/v1/publishers/anonymous":{"post":{"tags":["Publishers"],"summary":"Issue an accountless publisher and credential","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"client_installation_id":{"type":"string","minLength":16,"maxLength":128}},"additionalProperties":false}}}},"responses":{"201":{"description":"Credential issued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublisherIssuance"}}}},"429":{"$ref":"#/components/responses/Problem"}}}},"/api/v1/publishers/{id}/claim-challenge":{"post":{"tags":["Publishers"],"summary":"Create a short-lived publisher ownership challenge","security":[{"publisherToken":[]}],"parameters":[{"$ref":"#/components/parameters/PublicId"}],"responses":{"201":{"description":"Challenge created"},"401":{"$ref":"#/components/responses/Problem"}}}},"/api/v1/publishers/{id}/claim":{"post":{"tags":["Publishers"],"summary":"Claim a publisher from an authenticated user session","parameters":[{"$ref":"#/components/parameters/PublicId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["challenge"],"properties":{"challenge":{"type":"string"}},"additionalProperties":false}}}},"responses":{"200":{"description":"Publisher claimed"},"401":{"$ref":"#/components/responses/Problem"}}}},"/api/v1/manifests/validate":{"post":{"summary":"Validate and preview a manifest","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"/schemas/runpile-experiment-1.0.json"}}}},"responses":{"200":{"description":"Validation result","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Validation"}}}}}}},"/api/v1/experiments":{"post":{"tags":["Experiments"],"summary":"Create an idempotent draft","security":[{"publisherToken":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"/schemas/runpile-experiment-1.0.json"}}}},"responses":{"201":{"description":"Draft created"},"409":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"}}}},"/api/v1/experiments/{id}":{"get":{"tags":["Experiments"],"summary":"Get an experiment or authorized draft","parameters":[{"$ref":"#/components/parameters/PublicId"}],"responses":{"200":{"description":"Experiment"},"404":{"$ref":"#/components/responses/Problem"}}},"patch":{"tags":["Experiments"],"summary":"Correct draft metadata or create a revision","security":[{"publisherToken":[]}],"parameters":[{"$ref":"#/components/parameters/PublicId"}],"responses":{"200":{"description":"Experiment updated"},"401":{"$ref":"#/components/responses/Problem"}}}},"/api/v1/experiments/{id}/artifacts:initiate":{"post":{"tags":["Experiments"],"summary":"Declare evidence and obtain constrained uploads","security":[{"publisherToken":[]}],"parameters":[{"$ref":"#/components/parameters/PublicId"}],"responses":{"200":{"description":"Presigned upload targets"},"422":{"$ref":"#/components/responses/Problem"}}}},"/api/v1/experiments/{id}/finalize":{"post":{"tags":["Experiments"],"summary":"Verify and publish a draft","security":[{"publisherToken":[]}],"parameters":[{"$ref":"#/components/parameters/PublicId"}],"responses":{"200":{"description":"Stable experiment and run URLs with separate indexing state"},"422":{"$ref":"#/components/responses/Problem"}}}},"/api/v1/submissions/{id}/status":{"get":{"tags":["Experiments"],"summary":"Get scanning and indexing status","security":[{"publisherToken":[]}],"parameters":[{"$ref":"#/components/parameters/PublicId"}],"responses":{"200":{"description":"Processing state"}}}},"/api/v1/runs":{"get":{"tags":["Runs"],"summary":"Search indexed public runs","parameters":[{"name":"q","in":"query","schema":{"type":"string"}},{"name":"model","in":"query","schema":{"type":"string"}},{"name":"accelerator","in":"query","schema":{"type":"string"}},{"name":"runtime","in":"query","schema":{"type":"string"}},{"name":"status","in":"query","schema":{"type":"string"}},{"name":"concurrency","in":"query","schema":{"type":"integer"}},{"name":"sort","in":"query","schema":{"type":"string"}},{"name":"cursor","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"Cursor-paginated run results"},"422":{"$ref":"#/components/responses/Problem"}}}},"/api/v1/runs/{id}":{"get":{"tags":["Runs"],"summary":"Get a public or unlisted run","parameters":[{"$ref":"#/components/parameters/PublicId"}],"responses":{"200":{"description":"Run with normalized fields and source JSON"},"404":{"$ref":"#/components/responses/Problem"}}}},"/api/v1/artifacts/{id}/download":{"get":{"tags":["Runs"],"summary":"Obtain a short-lived safe evidence download","parameters":[{"$ref":"#/components/parameters/PublicId"}],"responses":{"307":{"description":"Redirect to signed download"},"404":{"$ref":"#/components/responses/Problem"}}}},"/api/v1/comparisons/analyze":{"post":{"tags":["Comparisons"],"summary":"Analyze comparability without persisting","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComparisonInput"}}}},"responses":{"200":{"description":"Field differences, rationale, warnings, and sweep detection"}}}},"/api/v1/comparisons":{"post":{"tags":["Comparisons"],"summary":"Save a shareable comparison","security":[{"publisherToken":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ComparisonInput"},{"type":"object","required":["title"],"properties":{"title":{"type":"string","maxLength":180},"visibility":{"enum":["public","unlisted"]}}}]}}}},"responses":{"201":{"description":"Saved comparison with permanent URL"}}}},"/api/v1/comparisons/{id}":{"get":{"tags":["Comparisons"],"summary":"Get a saved comparison","parameters":[{"$ref":"#/components/parameters/PublicId"}],"responses":{"200":{"description":"Saved comparison"},"404":{"$ref":"#/components/responses/Problem"}}}},"/api/v1/reports":{"post":{"tags":["Moderation"],"summary":"Report unsafe or misleading content","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["target_type","target_id","reason"],"properties":{"target_type":{"enum":["experiment","run","artifact"]},"target_id":{"type":"string"},"reason":{"type":"string"},"details":{"type":"string","maxLength":4000}}}}}},"responses":{"201":{"description":"Report queued"},"429":{"$ref":"#/components/responses/Problem"}}}}},"components":{"securitySchemes":{"publisherToken":{"type":"http","scheme":"bearer","bearerFormat":"rp_live_<prefix>_<secret>"}},"parameters":{"PublicId":{"name":"id","in":"path","required":true,"schema":{"type":"string"}}},"responses":{"Problem":{"description":"RFC 9457 problem detail","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"schemas":{"Problem":{"type":"object","required":["type","title","status","code"],"properties":{"type":{"type":"string","format":"uri"},"title":{"type":"string"},"status":{"type":"integer"},"code":{"type":"string"},"detail":{"type":"string"},"errors":{"type":"array","items":{"type":"object","required":["code","path","message"],"properties":{"code":{"type":"string"},"path":{"type":"string"},"message":{"type":"string"}}}}}},"PublisherIssuance":{"type":"object","required":["publisher","credential","scopes","quota"],"properties":{"publisher":{"type":"object"},"credential":{"type":"string","writeOnly":true},"scopes":{"type":"array","items":{"type":"string"}},"quota":{"type":"object"}}},"Validation":{"type":"object","required":["valid","errors","warnings","preview"],"properties":{"valid":{"type":"boolean"},"errors":{"type":"array"},"warnings":{"type":"array"},"preview":{"type":"object"},"normalized_manifest":{"type":"object"}}},"ComparisonInput":{"type":"object","required":["run_ids"],"properties":{"run_ids":{"type":"array","minItems":2,"maxItems":20,"uniqueItems":true,"items":{"type":"string"}},"intent":{"enum":["exploratory","compare_model","compare_hardware","compare_runtime_configuration"]}}}}}}