Skip to main content
POST
/
api
/
agents
/
optimize-instructions
Optimize Instructions
curl --request POST \
  --url https://api.example.com/api/agents/optimize-instructions \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "instructions": "<string>",
  "model_id": 123
}
'
{}

Documentation Index

Fetch the complete documentation index at: https://docs.xagent.run/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Request model for optimizing agent instructions.

instructions
string
required

Draft instructions to optimize

model_id
integer | null

Model ID to use for optimization

Response

Successful Response

{key}
string