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

# Submit a task for execution

> Full 8-stage pipeline: guardrail → credit → compute → verify → anchor → receipt



## OpenAPI

````yaml POST /api/v1/tasks/submit
openapi: 3.0.0
info:
  title: AgentChain & PRIOR API
  description: The centralized gateway for the decentralized compute network.
  version: '1.0'
  contact: {}
servers:
  - url: https://api.agentchain.xyz
    description: Production
security: []
tags: []
paths:
  /api/v1/tasks/submit:
    post:
      tags:
        - tasks
      summary: Submit a task for execution
      description: >-
        Full 8-stage pipeline: guardrail → credit → compute → verify → anchor →
        receipt
      operationId: TaskController_submitTask
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - prompt
                - taskType
                - agentId
              properties:
                prompt:
                  type: string
                  description: The prompt/instruction for the LLM
                  example: >-
                    Analyze the sentiment of the following text: "Bitcoin is
                    looking bullish today"
                taskType:
                  type: string
                  enum:
                    - general
                    - code
                    - analysis
                    - creative
                    - trade_signal
                    - evm-action
                  description: >-
                    Type of task. Use evm-action for deterministic EVM state
                    verification.
                  example: analysis
                agentId:
                  type: string
                  description: Agent fingerprint ID (unique per agent)
                  example: agent-alpha-001
                metadata:
                  type: object
                  description: Optional metadata for the task
                model:
                  type: string
                  description: >-
                    Model slug from the whitelist (e.g. "llama-3.3-70b").
                    Defaults to llama-3.3-70b if omitted. Ignored for evm-action
                    type.
                  example: llama-3.3-70b
                evmPayload:
                  type: object
                  description: >-
                    Required when taskType is evm-action. EVM action payload for
                    deterministic verification.
                  properties:
                    actionId:
                      type: string
                      description: bytes32 hex — unique action identifier
                    agentId:
                      type: string
                      description: Agent wallet address (0x...)
                    preStateRoot:
                      type: string
                      description: bytes32 hex — EVM state root before action
                    transactions:
                      type: array
                      items:
                        type: object
                        properties:
                          target:
                            type: string
                            description: Contract address (0x...)
                          calldata:
                            type: string
                            description: ABI-encoded calldata (0x...)
                          value:
                            type: string
                            description: Wei value as decimal string
                          slippageBps:
                            type: string
                            description: Slippage tolerance in basis points
                    effectClaimHash:
                      type: string
                      description: bytes32 hex — claimed effect hash
      responses:
        '200':
          description: Task executed — provenance receipt returned
          content:
            application/json:
              schema:
                type: object
                properties:
                  taskId:
                    type: string
                  status:
                    type: string
                    enum:
                      - COMPLETED
                      - UNMETERED
                      - GUARDRAIL_BLOCKED
                      - INSUFFICIENT_CREDITS
                      - COMPUTE_FAILED
                      - OUTPUT_BLOCKED
                  agentId:
                    type: string
                  model:
                    type: string
                  provider:
                    type: string
                  latencyMs:
                    type: number
                  output:
                    type: string
                  ipfsCid:
                    type: string
                  stateRoot:
                    type: string
                  verificationStatus:
                    type: string
                  verificationScore:
                    type: number
                  verificationProof:
                    type: string
                    nullable: true
                    description: TX hash from on-chain verification anchor
                  verificationBasescanUrl:
                    type: string
                    nullable: true
                  attestationUid:
                    type: string
                    nullable: true
                    description: EAS Omni-Stamp UID (bytes32 hex)
                  easscanUrl:
                    type: string
                    nullable: true
                    description: EASScan deep link
        '400':
          description: Invalid request body
        '401':
          description: Missing or invalid JWT
        '418':
          description: >-
            Guardrail or output policy blocked this task. Your operator config
            is the wall — check maxCreditsPerDay, maxTasksPerHour, or
            allowedTaskTypes.
      security:
        - bearer: []
components:
  securitySchemes:
    bearer:
      scheme: bearer
      bearerFormat: JWT
      type: http

````