> ## Documentation Index
> Fetch the complete documentation index at: https://docs.predicate.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Submit Task

> Processes a transaction by verifying it against the application's policy using Predicate's operator network. Returns a structured response with validation results and compliance status.



## OpenAPI

````yaml POST /v1/task
openapi: 3.0.1
info:
  title: Predicate API
  description: API for sending Ethereum-like transactions to the Predicate network.
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.predicate.io
security:
  - ApiKeyAuth: []
paths:
  /v1/task:
    post:
      description: >-
        Processes a transaction by verifying it against the application's policy
        using Predicate's operator network. Returns a structured response with
        validation results and compliance status.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Transaction'
            examples:
              example-request:
                summary: Basic Transaction Request
                value:
                  from: '0x38f6001e8ac11240f903CBa56aFF72A1425ae371'
                  to: '0xe7f2cd31e61b05b7634fc532c59b78a5dfba8080'
                  data: 0x
                  msg_value: '0'
                  chain_id: 1
      responses:
        '200':
          description: Successfully processed task
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TransactionResponse'
        '400':
          description: >-
            Bad Request: The request format is invalid or missing required
            fields
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                missing_fields:
                  summary: Missing required fields
                  value:
                    error: 400
                    message: 'Missing required field: from'
        '401':
          description: 'Unauthorized: Missing or invalid API key'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                invalid_token:
                  summary: Missing or invalid token
                  value:
                    error: 401
                    message: Missing or invalid token
        '403':
          description: >-
            Forbidden: The client does not have permission to access the
            requested resource
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                insufficient_permissions:
                  summary: Insufficient permissions
                  value:
                    error: 403
                    message: Insufficient permissions
        '404':
          description: 'Not Found: The requested resource could not be found'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                not_found:
                  summary: Resource not found
                  value:
                    error: 404
                    message: Resource not found
        '408':
          description: 'Request Timeout: The request took too long to process'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                timeout:
                  summary: Request timeout
                  value:
                    error: 408
                    message: Request timeout
        '429':
          description: 'Too Many Requests: Rate limit exceeded'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                rate_limit_exceeded:
                  summary: Rate limit exceeded
                  value:
                    error: 429
                    message: Rate limit exceeded
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                internal_error:
                  summary: Internal server error
                  value:
                    error: 500
                    message: Internal server error
        '503':
          description: Service Unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                service_unavailable:
                  summary: Service unavailable
                  value:
                    error: 503
                    message: Service unavailable
        '504':
          description: Gateway Timeout
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                gateway_timeout:
                  summary: Gateway timeout
                  value:
                    error: 504
                    message: Gateway timeout
components:
  schemas:
    Transaction:
      type: object
      properties:
        from:
          type: string
          description: Address of the sender (must be a valid Ethereum address)
          example: '0x1234567890123456789012345678901234567890'
        to:
          type: string
          description: >-
            Destination address (the target smart contract which enforces the
            policy)
          example: '0x1234567890123456789012345678901234567890'
        data:
          type: string
          description: >-
            Hex-encoded calldata relevant for the contract function call e.g.,
            amount to lend, recipient address, etc.
          example: 0x
        msg_value:
          type: string
          description: Amount of ETH (in wei) to send with the transaction
          example: '0'
        chain_id:
          type: integer
          format: uint64
          description: >-
            Optional chain ID for the target blockchain. If not provided,
            defaults to ethereum mainnet (1)
          example: 1
      required:
        - from
        - to
        - data
        - msg_value
    TransactionResponse:
      type: object
      properties:
        is_compliant:
          type: boolean
          description: Indicates whether the transaction meets the policy requirements
          example: true
        signers:
          type: array
          description: The addresses that signed off on the users compliance status
          items:
            type: string
            example: '0xDAc74b6f9B3609E914c924eB87Adff87A30fcDf6'
        signature:
          type: array
          description: A ECDSA Signature from the Predicate attestation server
          items:
            type: string
            example: >-
              0x8e10271f744c41e134d0e4ec92931a93a25c249730c1677d5be723831d68d0c660bb3c3aa409ed06d20a07367b1707908c49ef1209f8c50328cb77d2b4cac3821c
        expiry_block:
          type: integer
          format: uint64
          description: >-
            Timestamp after which this response is no longer valid (prev block
            number)
        task_id:
          type: string
          format: uuid
          description: Unique identifier for the task
          example: e4732bbe-aa8f-44fb-8c09-c73bdc31eeae
    Error:
      required:
        - error
        - message
      type: object
      properties:
        error:
          type: integer
          format: int32
        message:
          type: string
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````