Saltar al contenido principal
POST
/
agent
/
job
/
{domain}
Create agent job
curl --request POST \
  --url https://api-dsc.mintlify.com/v1/agent/job/{domain} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "branch": "<string>",
  "messages": [
    {
      "role": "system",
      "content": "<string>"
    }
  ]
}'
"<string>"
Este endpoint crea un trabajo de agente a partir de los mensajes proporcionados y la información de la branch. El trabajo se ejecuta de forma asíncrona y devuelve una respuesta en streaming con los detalles de la ejecución y los resultados. Si no existe una branch, el agente crea una. Si los archivos se editan correctamente, al finalizar el trabajo se crea automáticamente una solicitud de extracción en borrador.

Límites de uso

La API del agente tiene los siguientes límites:
  • 10,000 usos por key al mes
  • 10,000 solicitudes por organización de Mintlify por hora
  • 10,000 solicitudes por IP al día

Uso recomendado

Para obtener los mejores resultados, utiliza el hook useChat de ai-sdk para enviar solicitudes y gestionar respuestas.

Authorizations

Authorization
string
header
required

The Authorization header expects a Bearer token. See the Assistant API Key documentation for details on how to get your API key.

Path Parameters

domain
string
required

The domain identifier from your domain.mintlify.app URL. Can be found in the top left of your dashboard.

Body

application/json
branch
string
required

The name of the Git branch that the agent should work on, will be automatically created if it doesn't exist

messages
object[]
required

A list of previous messages to provide to the agent.

Response

200 - text/plain

Agent job created successfully (streaming response). X-Session-Id Header is sent back in the response

Streaming response containing the agent job execution details and results.

I