Passer au contenu 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>"
Cet endpoint crée une tâche d’agent à partir des messages fournis et des informations de branche. La tâche s’exécute de manière asynchrone et renvoie une réponse en flux continu contenant les détails d’exécution et les résultats. Si la branche n’existe pas, l’agent en crée une. Si des fichiers sont modifiés avec succès, une pull request (demande de fusion) en brouillon est automatiquement créée à la fin de la tâche.

Limites de taux

L’API de l’agent impose les limites suivantes :
  • 10 000 utilisations par key et par mois
  • 10 000 requêtes par organisation Mintlify et par heure
  • 10 000 requêtes par adresse IP et par jour

Utilisation recommandée

Pour de meilleurs résultats, utilisez le hook useChat d’ai-sdk pour envoyer des requêtes et traiter les réponses.

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