> ## Documentation Index
> Fetch the complete documentation index at: https://firecrawl-research-index-life-sciences-docs.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Agente

> ¿Eres un agente de IA que necesita una clave de API de Firecrawl? Consulta [firecrawl.dev/agent-onboarding/SKILL.md](https://www.firecrawl.dev/agent-onboarding/SKILL.md) para ver instrucciones de incorporación automatizada.


## OpenAPI

````yaml es/api-reference/v2-openapi.json POST /agent
openapi: 3.0.0
info:
  contact:
    email: support@firecrawl.dev
    name: Firecrawl Support
    url: https://firecrawl.dev/support
  description: >-
    API para interactuar con los servicios de Firecrawl y realizar tareas de
    scraping y rastreo web.
  title: Firecrawl API
  version: v2
servers:
  - url: https://api.firecrawl.dev/v2
security:
  - bearerAuth: []
paths:
  /agent:
    post:
      tags:
        - Agent
      summary: Inicia una tarea de agente para la extracción de datos mediante agentes
      operationId: startAgent
      requestBody:
        content:
          application/json:
            schema:
              properties:
                maxCredits:
                  description: >-
                    Créditos máximos que se pueden gastar en esta tarea del
                    agente. El valor predeterminado es 2500 si no se especifica.
                    Los valores superiores a 2.500 siempre se facturan como
                    solicitudes de pago.
                  type: number
                model:
                  default: spark-1-mini
                  description: >-
                    El modelo que utilizará el agente para la tarea.
                    spark-1-mini (predeterminado) es un 60 % más barato;
                    spark-1-pro ofrece mayor precisión para tareas complejas.
                  enum:
                    - spark-1-mini
                    - spark-1-pro
                  type: string
                prompt:
                  description: El prompt que describe los datos que se van a extraer
                  maxLength: 10000
                  type: string
                schema:
                  description: Esquema JSON opcional para estructurar los datos extraídos
                  type: object
                strictConstrainToURLs:
                  description: >-
                    Si es true, el agente solo visitará las URL proporcionadas
                    en el array urls
                  type: boolean
                urls:
                  description: Lista opcional de URLs a las que se limitará el agente
                  items:
                    format: uri
                    type: string
                  type: array
              required:
                - prompt
              type: object
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  id:
                    format: uuid
                    type: string
                  success:
                    type: boolean
                type: object
          description: La tarea del agente se inició correctamente
        '402':
          content:
            application/json:
              schema:
                properties:
                  error:
                    example: Payment required to access this resource.
                    type: string
                type: object
          description: Se requiere pago
        '429':
          content:
            application/json:
              schema:
                properties:
                  error:
                    example: Rate limit exceeded.
                    type: string
                type: object
          description: Demasiadas solicitudes
      security:
        - bearerAuth: []
components:
  securitySchemes:
    bearerAuth:
      scheme: bearer
      type: http

````