{"openapi":"3.1.0","info":{"title":"Agent Paste Content API","version":"0.1.0","description":"Signed-URL static asset gateway for Agent Paste artifact files."},"servers":[{"url":"https://usercontent.agent-paste.sh"}],"security":[{"SignedContentToken":[]}],"components":{"securitySchemes":{"SignedContentToken":{"type":"http","scheme":"bearer","bearerFormat":"Agent Paste signed content token","description":"Signed content token carried in the `{token}` path parameter. Modeled as bearer-equivalent because OpenAPI security schemes do not support path parameters."}},"schemas":{"ErrorEnvelope":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["api_key_not_found","api_key_revoked","artifact_not_found","database_unavailable","draft_revision_conflict","entrypoint_not_in_revision","file_count_cap_exceeded","file_size_cap_exceeded","forbidden","idempotency_in_flight","invalid_auth","invalid_content_length","invalid_cursor","invalid_idempotency_key","invalid_request","not_authenticated","not_found","pinned_artifact_cap_exceeded","rate_limited_actor","rate_limited_artifact","rate_limited_workspace","ephemeral_provision_rate_limited","ephemeral_provision_unavailable","pow_required","pow_invalid","revision_retained","revision_size_cap_exceeded","revision_unpublished","storage_unavailable","unexpected_upload_object","upload_incomplete","upload_session_expired","upload_session_not_found","usage_policy_exceeded","write_allowance_exceeded","revision_ceiling_exceeded"]},"message":{"type":"string"},"docs":{"type":"string","format":"uri"},"request_id":{"type":"string","minLength":1}},"required":["code","message"]}},"required":["error"]},"ContentNotFoundErrorEnvelope":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["not_found"]},"message":{"type":"string"},"docs":{"type":"string","format":"uri"},"request_id":{"type":"string","minLength":1}},"required":["code","message"]}},"required":["error"]},"ArtifactRateLimitErrorEnvelope":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["rate_limited_artifact"]},"message":{"type":"string"},"docs":{"type":"string","format":"uri"},"request_id":{"type":"string","minLength":1}},"required":["code","message"]}},"required":["error"]}},"parameters":{}},"paths":{"/v/{token}/{path}":{"get":{"operationId":"content.get","summary":"Resolve and serve a signed artifact file.","security":[{"SignedContentToken":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"token","in":"path","description":"Signed content token."},{"schema":{"type":"string"},"required":true,"name":"path","in":"path","description":"File path within the artifact."},{"schema":{"type":"string","minLength":8,"maxLength":128,"description":"Caller-supplied request id. Worker echoes it back; non-matching values are replaced with a UUID."},"required":false,"description":"Caller-supplied request id. Worker echoes it back; non-matching values are replaced with a UUID.","name":"X-Request-Id","in":"header"}],"responses":{"200":{"description":"Artifact file bytes","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"404":{"description":"Signed content token or artifact file was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContentNotFoundErrorEnvelope"}}}},"429":{"description":"Artifact read rate limit exceeded. Error code is rate_limited_artifact.","headers":{"Retry-After":{"schema":{"type":"string","description":"Seconds to wait before retrying."},"required":true,"description":"Seconds to wait before retrying."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ArtifactRateLimitErrorEnvelope"}}}}}},"head":{"operationId":"content.head","summary":"Resolve metadata for a signed artifact file.","security":[{"SignedContentToken":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"token","in":"path","description":"Signed content token."},{"schema":{"type":"string"},"required":true,"name":"path","in":"path","description":"File path within the artifact."},{"schema":{"type":"string","minLength":8,"maxLength":128,"description":"Caller-supplied request id. Worker echoes it back; non-matching values are replaced with a UUID."},"required":false,"description":"Caller-supplied request id. Worker echoes it back; non-matching values are replaced with a UUID.","name":"X-Request-Id","in":"header"}],"responses":{"200":{"description":"Artifact file metadata"},"404":{"description":"Signed content token or artifact file was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContentNotFoundErrorEnvelope"}}}},"429":{"description":"Artifact read rate limit exceeded. Error code is rate_limited_artifact.","headers":{"Retry-After":{"schema":{"type":"string","description":"Seconds to wait before retrying."},"required":true,"description":"Seconds to wait before retrying."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ArtifactRateLimitErrorEnvelope"}}}}}}}},"webhooks":{}}