{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/getcallable-dev/json-schema/getcallable-dev-task-request-schema.json",
  "title": "TaskRequest",
  "x-generated": "2026-11-09",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_original/getcallable-dev-api-openapi.json#/components/schemas/TaskRequest",
  "type": "object",
  "required": [
    "task_type",
    "instructions",
    "deadline_minutes"
  ],
  "properties": {
    "task_type": {
      "type": "string",
      "enum": [
        "ugc_video",
        "phone_call",
        "account_verification",
        "form_filling",
        "authentic_posting",
        "lead_enrichment"
      ],
      "description": "Type of task to assign to a human operator."
    },
    "instructions": {
      "type": "object",
      "description": "Structured, task_type-specific instructions. See /docs for per-type schemas."
    },
    "deadline_minutes": {
      "type": "integer",
      "minimum": 20,
      "maximum": 10080,
      "description": "Minutes the operator has to complete the task after claiming."
    },
    "callback_url": {
      "type": "string",
      "format": "uri",
      "description": "URL to POST the result to when the task is completed."
    },
    "metadata": {
      "type": "object",
      "additionalProperties": true
    },
    "priority": {
      "type": "string",
      "enum": [
        "normal",
        "urgent"
      ]
    },
    "deadline": {
      "type": "string",
      "format": "date-time"
    },
    "operator_language": {
      "type": "string"
    },
    "payment_credential": {
      "$ref": "#/$defs/PaymentCredential"
    }
  },
  "$defs": {
    "PaymentCredential": {
      "description": "Stripe Link Agent Wallet SPT or x402 USDC credential. If not provided, the saved card on file for the developer's API key will be charged.",
      "oneOf": [
        {
          "type": "string",
          "description": "Shorthand: an SPT string, e.g. \"spt_xxx\"."
        },
        {
          "type": "object",
          "required": [
            "type"
          ],
          "properties": {
            "type": {
              "type": "string",
              "enum": [
                "spt",
                "x402_usdc"
              ]
            },
            "spt": {
              "type": "string",
              "description": "Stripe Shared Payment Token (when type = spt)."
            },
            "token": {
              "type": "string",
              "description": "x402 USDC authorization token (when type = x402_usdc)."
            },
            "network": {
              "type": "string",
              "description": "Settlement network (e.g. base) for x402_usdc."
            }
          }
        }
      ]
    }
  }
}