{ "openapi": "3.0.3", "info": { "title": "Agent Credit Bureau API", "description": "Agent Credit Bureau returns signed, version-specific evidence about software agent order-total checks. Test the public benchmark endpoints without an API key or card. Benchmarks use synthetic order data and are not third-party or consumer credit ratings. Starter subscriptions provide 100 verification lookups per cycle; the paid endpoint requires a registered agent ID and version.", "version": "1.0.0", "contact": { "name": "Agent Credit Bureau", "url": "https://github.com/saka20130026-oss/agent-verification-api-quickstart" } }, "servers": [ { "url": "https://agent-credit-bureau-v3.onrender.com" } ], "externalDocs": { "url": "https://github.com/saka20130026-oss/agent-verification-api-quickstart" }, "paths": { "/v1/benchmarks": { "get": { "operationId": "listBenchmarks", "summary": "List public synthetic-input benchmark scenarios", "security": [], "responses": { "200": { "description": "Benchmark index", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BenchmarkIndex" } } } } } } }, "/v1/agents/{agent_id}/score": { "get": { "operationId": "getBenchmarkScore", "summary": "Read a signed benchmark score and test history", "description": "Public benchmark fixture only. Example agent ID: benchmark-order-01. Does not debit credits.", "parameters": [ { "name": "agent_id", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1, "maxLength": 80, "pattern": "^[a-zA-Z0-9._-]+$" }, "example": "benchmark-order-01" } ], "security": [], "responses": { "200": { "description": "Signed synthetic-input benchmark", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BenchmarkScore" } } } }, "404": { "description": "Unknown public benchmark", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true } } } }, "422": { "description": "Invalid benchmark identifier", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true } } } } } } }, "/v1/signing-keys/{requested_key_id}": { "get": { "operationId": "getSigningKey", "summary": "Get the currently published P-256 public key", "description": "Pass the key_id from a signed response. Verify the Base64-decoded IEEE P1363 signature over the RFC 8785 canonical JSON object after removing verification_signature; pin a key fetched independently from this endpoint.", "parameters": [ { "name": "requested_key_id", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1, "maxLength": 80, "pattern": "^[a-zA-Z0-9._-]+$" } } ], "security": [], "responses": { "200": { "description": "Published EC JSON Web Key", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PublicSigningKey" } } } }, "404": { "description": "Key is not currently published", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true } } } }, "422": { "description": "Invalid key identifier", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true } } } } } } }, "/v1/agents/{agent_id}/verify": { "get": { "operationId": "verifyAgent", "summary": "Get a signed verification for a registered agent version", "description": "Requires a subscribed API key, or a trial key limited to controlled synthetic benchmarks. A new verification may use one credit. Reuse the same nonce and arguments only for a retry of the same request. The result does not authorize a transaction.", "parameters": [ { "name": "agent_id", "in": "path", "required": true, "schema": { "type": "string", "minLength": 1, "maxLength": 80, "pattern": "^[a-zA-Z0-9._-]+$" } }, { "name": "agent_version", "in": "query", "required": true, "schema": { "type": "string", "minLength": 1, "maxLength": 80, "pattern": "^[a-zA-Z0-9._-]+$" } }, { "name": "nonce", "in": "query", "required": true, "schema": { "type": "string", "minLength": 22, "maxLength": 80, "pattern": "^[A-Za-z0-9_-]+$" } }, { "name": "task_type", "in": "query", "required": false, "schema": { "type": "string", "enum": [ "order-total-krw" ], "default": "order-total-krw" } } ], "security": [ { "CustomerBearer": [] } ], "responses": { "200": { "description": "Signed verification result", "content": { "application/json": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/Verification" }, { "$ref": "#/components/schemas/TrialVerification" } ] } } } }, "401": { "description": "Customer API key missing or invalid", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true } } } }, "402": { "description": "No paid entitlement or credits, or trial exhausted. A trial response can include a Polar checkout URL. Preserve checkout_id and claim_token securely and use the developer portal's guided flow unless your client implements paid-key claim.", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true } } } }, "403": { "description": "A trial key was used outside the controlled benchmark scope." }, "404": { "description": "Agent not registered; includes a signed insufficient-evidence result", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Verification" } } } }, "409": { "description": "Nonce was already used with different arguments", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true } } } }, "422": { "description": "Invalid request parameters", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true } } } }, "503": { "description": "Service temporarily unavailable", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true } } } } } } }, "/v1/keys/trial": { "post": { "operationId": "issueTrialKey", "summary": "Issue a no-card, no-account three-lookup trial key", "description": "Limited per connection and by daily capacity. The key expires after 24 hours and works only on controlled synthetic benchmarks.", "responses": { "201": { "description": "Trial key issued. Keep api_key private.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TrialIssue" } } } }, "404": { "description": "Trial issuance disabled." }, "429": { "description": "Daily issuance limit reached (see Retry-After)." } } } } }, "components": { "schemas": { "BenchmarkIndex": { "type": "object", "required": [ "source", "synthetic_inputs", "agent_ids" ], "properties": { "source": { "type": "string", "enum": [ "controlled_benchmark" ] }, "synthetic_inputs": { "type": "boolean" }, "agent_ids": { "type": "array", "items": { "type": "string", "minLength": 1, "maxLength": 80, "pattern": "^[a-zA-Z0-9._-]+$" } } }, "additionalProperties": true }, "BenchmarkScore": { "type": "object", "required": [ "source", "synthetic_inputs", "real_world_reputation", "agent_id", "agent_version", "benchmark_id", "task_type", "methodology", "score", "history", "key_id", "signature_algorithm", "signature_encoding", "signature_canonicalization", "verification_signature" ], "properties": { "source": { "type": "string", "enum": [ "controlled_benchmark" ] }, "synthetic_inputs": { "type": "boolean" }, "real_world_reputation": { "type": "boolean" }, "agent_id": { "type": "string", "minLength": 1, "maxLength": 80, "pattern": "^[a-zA-Z0-9._-]+$" }, "agent_version": { "type": "string", "minLength": 1, "maxLength": 80, "pattern": "^[a-zA-Z0-9._-]+$" }, "benchmark_id": { "type": "string", "minLength": 1, "maxLength": 80, "pattern": "^[a-zA-Z0-9._-]+$" }, "task_type": { "type": "string" }, "methodology": { "type": "string" }, "score": { "type": "object", "required": [ "credit_score", "grade" ], "properties": { "credit_score": { "type": "number" }, "grade": { "type": "string" } }, "additionalProperties": true }, "history": { "type": "array", "items": { "type": "object", "required": [ "case_id", "expected_total_krw", "observed_total_krw", "outcome" ], "properties": { "case_id": { "type": "string" }, "expected_total_krw": { "type": "integer" }, "observed_total_krw": { "type": "integer" }, "outcome": { "type": "string", "enum": [ "success", "fail" ] } }, "additionalProperties": true } }, "key_id": { "type": "string", "minLength": 1, "maxLength": 80, "pattern": "^[a-zA-Z0-9._-]+$" }, "signature_algorithm": { "type": "string", "enum": [ "ES256" ] }, "signature_encoding": { "type": "string", "enum": [ "P1363-base64" ] }, "signature_canonicalization": { "type": "string", "enum": [ "RFC8785" ] }, "verification_signature": { "type": "string", "format": "byte" } }, "additionalProperties": true }, "Verification": { "type": "object", "required": [ "agent_id", "agent_version", "task_type", "nonce", "decision", "reason", "counts", "checked_at", "expires_at", "http_status", "lifetime_score", "scoped_score", "verification_public_key", "key_id", "signature_algorithm", "signature_encoding", "signature_canonicalization", "verification_signature" ], "properties": { "agent_id": { "type": "string", "minLength": 1, "maxLength": 80, "pattern": "^[a-zA-Z0-9._-]+$" }, "agent_version": { "type": "string", "minLength": 1, "maxLength": 80, "pattern": "^[a-zA-Z0-9._-]+$" }, "task_type": { "type": "string", "enum": [ "order-total-krw" ] }, "nonce": { "type": "string" }, "decision": { "type": "string", "enum": [ "limited_pilot", "blocked", "insufficient_evidence" ] }, "reason": { "type": "string" }, "counts": { "type": "object", "required": [ "success", "fail", "violation" ], "properties": { "success": { "type": "integer" }, "fail": { "type": "integer" }, "violation": { "type": "integer" } }, "additionalProperties": true }, "checked_at": { "type": "string", "format": "date-time" }, "expires_at": { "type": "string", "format": "date-time" }, "http_status": { "type": "integer" }, "lifetime_score": { "type": "object", "nullable": true, "additionalProperties": true }, "scoped_score": { "type": "object", "nullable": true, "additionalProperties": true }, "verification_public_key": { "$ref": "#/components/schemas/PublicSigningKey" }, "key_id": { "type": "string", "minLength": 1, "maxLength": 80, "pattern": "^[a-zA-Z0-9._-]+$" }, "signature_algorithm": { "type": "string", "enum": [ "ES256" ] }, "signature_encoding": { "type": "string", "enum": [ "P1363-base64" ] }, "signature_canonicalization": { "type": "string", "enum": [ "RFC8785" ] }, "verification_signature": { "type": "string", "format": "byte" } }, "additionalProperties": true }, "PublicSigningKey": { "type": "object", "required": [ "kty", "crv", "x", "y", "kid", "alg" ], "properties": { "kty": { "type": "string", "enum": [ "EC" ] }, "crv": { "type": "string", "enum": [ "P-256" ] }, "x": { "type": "string" }, "y": { "type": "string" }, "kid": { "type": "string", "minLength": 1, "maxLength": 80, "pattern": "^[a-zA-Z0-9._-]+$" }, "alg": { "type": "string", "enum": [ "ES256" ] } }, "additionalProperties": true }, "TrialIssue": { "type": "object", "required": [ "api_key", "remaining_credits", "expires_at", "example" ], "properties": { "api_key": { "type": "string", "writeOnly": true }, "remaining_credits": { "type": "integer", "enum": [ 3 ] }, "expires_at": { "type": "string", "format": "date-time" }, "example": { "type": "object", "required": [ "agent_id", "agent_version", "task_type" ], "properties": { "agent_id": { "type": "string", "example": "benchmark-order-01" }, "agent_version": { "type": "string", "example": "reference-v1" }, "task_type": { "type": "string", "example": "order-total-krw" } } } } }, "TrialVerification": { "allOf": [ { "$ref": "#/components/schemas/BenchmarkScore" }, { "type": "object", "required": [ "nonce", "signature_scope", "remaining_credits" ], "properties": { "nonce": { "type": "string" }, "signature_scope": { "type": "string", "enum": [ "controlled-benchmark-trial" ] }, "remaining_credits": { "type": "integer", "minimum": 0, "maximum": 2 } } } ] } }, "securitySchemes": { "CustomerBearer": { "type": "http", "scheme": "bearer", "description": "Subscribed API key for production verification, or a trial key for controlled synthetic benchmarks." } } } }