WritersLogic Verifiable AI Agent Hub Audit Contract API

The Audit Contract API from WritersLogic Verifiable AI Agent Hub — 1 operation(s) for audit contract.

GitHub OpenAPI

Operations 1

POST /api/v1/audit-contract Smart Contract Auditor #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/writerslogic-com:writerslogic-com-audit-contract-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

writerslogic-com-audit-contract-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: WritersLogic Verifiable AI Agent Hub Audit Contract API
  version: 2.0.0
  description: Pay-per-call agents settled in USDC on Base via x402. Every response carries a signed provenance envelope.
  contact:
    name: WritersLogic
    url: https://writerslogic.com/agents
    email: agents@writerslogic.com
servers:
- url: https://agents.writerslogic.com
tags:
- name: Audit Contract
paths:
  /api/v1/audit-contract:
    post:
      operationId: contract_auditor
      summary: Smart Contract Auditor
      description: 'Source-level security review of Solidity: pass/warn/fail verdict, 0-100 risk score, severity-ranked findings with exact file:line, exploit scenario and a fix, plus a SARIF 2.1.0 log. Accepts raw code, a list of files, or an on-chain address (verified source is read from Sourcify). A deterministic detector pass (reentrancy ordering, tx.origin, delegatecall, unchecked calls, weak randomness, pre-0.8 arithmetic) runs beside one model review, and every model finding is checked against the source: its quoted snippet must exist and its line is corrected. A pre-audit triage, not a substitute for a manual audit; it cannot see deployed bytecode, off-chain components or economic assumptions, and not_checked lists what was missing.


        Price: 1.00 USDC on Base (x402).'
      x-x402-price-usdc: '1.00'
      x-x402-amount: '1000000'
      x-payment-info:
        protocols:
        - x402
        price:
          mode: fixed
          currency: USD
          amount: '1.00'
      x-audience: crypto
      x-sample-url: https://agents.writerslogic.com/api/v1/samples/contract-auditor
      security:
      - x402: []
      - apiKey: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              additionalProperties: false
              properties:
                code:
                  type: string
                  minLength: 1
                  maxLength: 100000
                  description: Raw Solidity source (one or more files concatenated). Provide exactly one of code, files or address.
                contractName:
                  type: string
                  maxLength: 200
                  description: Contract to focus on when several are present.
                files:
                  type: array
                  maxItems: 40
                  description: 'Alternative to code: Solidity files with repository-relative paths. Findings report the file and line, and the SARIF log points at them.'
                  items:
                    type: object
                    additionalProperties: false
                    required:
                    - path
                    - content
                    properties:
                      path:
                        type: string
                        minLength: 1
                        maxLength: 300
                      content:
                        type: string
                        maxLength: 100000
                address:
                  type: string
                  pattern: ^0x[0-9a-fA-F]{40}$
                  description: 'Alternative to code: an on-chain contract address. Its verified source is read from Sourcify (no API key); unverified contracts return 404.'
                chainId:
                  type: integer
                  minimum: 1
                  maximum: 2147483647
                  description: EVM chain id for address; default 1 (Ethereum mainnet).
            example:
              code: "pragma solidity ^0.8.20;\ncontract Vault {\n  mapping(address => uint256) public balances;\n  function deposit() external payable { balances[msg.sender] += msg.value; }\n  function withdraw() external {\n    (bool ok, ) = msg.sender.call{value: balances[msg.sender]}(\"\");\n    require(ok);\n    balances[msg.sender] = 0;\n  }\n}"
              contractName: Vault
      responses:
        '200':
          description: Paid result with provenance
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    additionalProperties: false
                    required:
                    - summary
                    - overall_risk
                    - findings
                    - verdict
                    - verdict_reason
                    - risk_score
                    - status
                    - next_step
                    - top_findings
                    - source
                    - sarif
                    - contract_names
                    - compiler_version
                    - not_checked
                    - severity_counts
                    - lines_of_code
                    properties:
                      summary:
                        type: string
                      overall_risk:
                        type: string
                        enum:
                        - critical
                        - high
                        - medium
                        - low
                        - informational
                        - none
                      findings:
                        type: array
                        items:
                          type: object
                          additionalProperties: false
                          required:
                          - id
                          - title
                          - severity
                          - category
                          - location
                          - code_snippet
                          - description
                          - exploit_scenario
                          - recommendation
                          - confidence
                          - source
                          - verification
                          - line_start
                          - line_end
                          - file
                          - line
                          - end_line
                          properties:
                            id:
                              type: string
                              description: Sequential id such as F-01.
                            title:
                              type: string
                            severity:
                              type: string
                              enum:
                              - critical
                              - high
                              - medium
                              - low
                              - informational
                            category:
                              type: string
                              enum:
                              - reentrancy
                              - integer_overflow_underflow
                              - access_control
                              - logic_error
                              - unchecked_external_call
                              - oracle_price_manipulation
                              - front_running_mev
                              - denial_of_service
                              - timestamp_dependence
                              - tx_origin_auth
                              - delegatecall_proxy
                              - storage_collision_uninitialized
                              - signature_replay
                              - erc_standard_violation
                              - centralization_risk
                              - gas_optimization
                              - other
                            location:
                              type: string
                              description: Contract.function and line number(s) from the numbered source.
                            code_snippet:
                              type: string
                              description: The exact source text of the vulnerable statement, copied verbatim without the line-number prefix.
                            description:
                              type: string
                            exploit_scenario:
                              type: string
                              description: Concrete attacker steps, or "n/a" for non-exploitable issues.
                            recommendation:
                              type: string
                              description: Specific fix, with a short code snippet when useful.
                            confidence:
                              type: string
                              enum:
                              - high
                              - medium
                              - low
                            source:
                              type: string
                              enum:
                              - model
                              - static
                              description: static = raised by the deterministic detector pass.
                            verification:
                              type: string
                              enum:
                              - verified
                              - line_corrected
                              - snippet_not_found
                              - static_detector
                              description: snippet_not_found lowers confidence to low.
                            line_start:
                              type: integer
                              description: True 1-based line of the snippet in the combined source the model read; 0 when it could not be located.
                            line_end:
                              type: integer
                            file:
                              type: string
                              description: File holding the finding; contract.sol for code input, the Sourcify or uploaded path otherwise.
                            line:
                              type: integer
                              description: 1-based line within file (1 when the snippet could not be located).
                            end_line:
                              type: integer
                      verdict:
                        type: string
                        enum:
                        - fail
                        - warn
                        - pass
                        - inconclusive
                        description: 'fail: a critical or high finding of medium or high confidence. warn: other findings. pass: only informational notes or none (not proof of safety). inconclusive: no findings but part of the source was not reviewed.'
                      verdict_reason:
                        type: string
                      risk_score:
                        type: integer
                        description: 0-100, computed in code from finding severity and confidence.
                      status:
                        type: string
                        enum:
                        - complete
                        - partial
                        description: partial when files were left out of the review; the result is still signed and not_checked says what is missing.
                      next_step:
                        type: string
                      top_findings:
                        type: array
                        items:
                          type: object
                          description: 'Up to 5 non-informational findings: id, title, severity, confidence, file, line, fix.'
                      source:
                        type: object
                        description: 'Where the source came from: kind (code, files, sourcify), file paths reviewed, and for Sourcify the address, chainId, match type, compiler and verification time.'
                      sarif:
                        type: object
                        description: SARIF 2.1.0 log, one result per finding at its file and line; uploads to GitHub code scanning as-is.
                      contract_names:
                        type: array
                        items:
                          type: string
                        description: Parsed from the source, not model-generated.
                      compiler_version:
                        type: string
                        description: Parsed pragma expression, or "unspecified".
                      not_checked:
                        type: array
                        items:
                          type: string
                        description: What this review could not see; an empty findings list does not cover these.
                      severity_counts:
                        type: object
                        additionalProperties: false
                        required:
                        - critical
                        - high
                        - medium
                        - low
                        - informational
                        properties:
                          critical:
                            type: integer
                          high:
                            type: integer
                          medium:
                            type: integer
                          low:
                            type: integer
                          informational:
                            type: integer
                      lines_of_code:
                        type: integer
                  _provenance:
                    type: object
                    description: C2PA-aligned manifest and W3C VC 2.0 (eddsa-jcs-2022) issued by the hub DID; verify at POST /api/v1/verify-provenance
                required:
                - data
                - _provenance
        '400':
          description: Invalid request (no payment consumed)
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  code:
                    type: string
        '401':
          description: Invalid X-API-KEY
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  code:
                    type: string
        '402':
          description: Payment required or invalid
          content:
            application/json:
              schema:
                type: object
                description: x402 v2 PaymentRequired (also base64 in the PAYMENT-REQUIRED header)
                properties:
                  x402Version:
                    type: integer
                  error:
                    type: string
                  code:
                    type: string
                  resource:
                    type: object
                  accepts:
                    type: array
                    items:
                      type: object
                  extensions:
                    type: object
        '502':
          description: Upstream failure; the payment is released or not settled
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  code:
                    type: string
      tags:
      - Audit Contract
components:
  securitySchemes:
    x402:
      type: apiKey
      in: header
      name: PAYMENT-SIGNATURE
      description: x402 v2 payment payload (base64) sent after a 402 challenge
    apiKey:
      type: apiKey
      in: header
      name: X-API-KEY