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

# 智能体

> 你是需要 EvoCrawl API 密钥的 AI 代理吗？请参阅 [evocrawl.dev/agent-onboarding/SKILL.md](https://www.evocrawl.com/agent-onboarding/SKILL.md) 了解自动化入门说明。


## OpenAPI

````yaml /zh/api-reference/v2-openapi.json POST /agent
openapi: 3.0.0
info:
  title: Evocrawl API
  version: v2
  description: 用于与 Evocrawl 服务交互，执行网页抓取和爬取任务的 API。
  contact:
    name: Evocrawl Support
    url: https://evocrawl.com/support
    email: support@evocrawl.dev
servers:
  - url: https://api.evocrawl.com/v2
security:
  - bearerAuth: []
paths:
  /agent:
    post:
      tags:
        - Agent
      summary: 启动用于 Agent 驱动数据提取的任务
      operationId: startAgent
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                urls:
                  type: array
                  items:
                    type: string
                    format: uri
                  description: 用于限定智能体访问范围的可选 URL 列表
                prompt:
                  type: string
                  description: 用于描述应提取哪些数据的提示词
                  maxLength: 10000
                schema:
                  type: object
                  description: 用于定义提取数据结构的可选 JSON Schema
                maxCredits:
                  type: number
                  description: 此代理任务可使用的最大额度。若未设置，默认值为 2500。高于 2,500 的值一律按付费请求计费。
                strictConstrainToURLs:
                  type: boolean
                  description: 如果为 true，代理将仅访问 urls 数组中提供的 URL
                model:
                  type: string
                  enum:
                    - spark-1-mini
                    - spark-1-pro
                  default: spark-1-mini
                  description: >-
                    适用于智能体任务的模型。spark-1-mini（默认）成本更低，价格便宜约 60%；spark-1-pro
                    在处理复杂任务时能提供更高的准确率。
              required:
                - prompt
      responses:
        '200':
          description: 代理任务已成功启动
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  id:
                    type: string
                    format: uuid
        '402':
          description: 需要付款
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: Payment required to access this resource.
        '429':
          description: 请求次数过多
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: Rate limit exceeded.
      security:
        - bearerAuth: []
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````