curl --request POST \
--url https://api.mintlify.com/v2/agent/{projectId}/job \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"prompt": "<string>"
}
'{
"id": "<string>",
"status": "active",
"source": {
"repository": "<string>",
"ref": "<string>"
},
"model": "<string>",
"prLink": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"archivedAt": "2023-11-07T05:31:56Z"
}Crear una tarea de agente que se ejecuta en segundo plano y devuelve inmediatamente un estado para polling.
curl --request POST \
--url https://api.mintlify.com/v2/agent/{projectId}/job \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"prompt": "<string>"
}
'{
"id": "<string>",
"status": "active",
"source": {
"repository": "<string>",
"ref": "<string>"
},
"model": "<string>",
"prLink": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"archivedAt": "2023-11-07T05:31:56Z"
}prompt en lugar de un array de mensajesid devueltostatus sea completed o failedprLink de la respuesta una vez que se cree el PRThe Authorization header expects a Bearer token. Use an admin API key (prefixed with mint_). This is a server-side secret key. Generate one on the API keys page in your dashboard.
The task instructions for the agent to execute.
Agent job created successfully. The job runs in the background.
Unique identifier for the agent job.
Current status of the agent job.
active, completed, archived, failed Information about the source repository.
Mostrar atributos secundarios
The AI model used for this job.
URL of the pull request created by the agent. Null until the PR is created.
Timestamp when the job was created.
Timestamp when the job was archived. Null if still active.
¿Esta página le ayudó?