Skip to main content
POST
/
agents
/
generate-yaml
Generate Yaml From Prompt Endpoint
curl --request POST \
  --url https://api.contextual.ai/v1/agents/generate-yaml \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "prompt": "<string>",
  "datastore_ids": [
    "3c90c3cc-0d44-4b50-8888-8dd25736052a"
  ]
}
'
{
  "yaml_config": "<string>"
}

Authorizations

Authorization
string
header
required

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

Body

application/json

Request to generate YAML configuration from a prompt.

prompt
string
required

User's prompt describing what they want the agent to do

Minimum string length: 1
datastore_ids
string<uuid>[]

List of datastore IDs to link to the agent

Response

Successful Response

Response containing the generated YAML configuration.

yaml_config
string
required

Generated ACL YAML configuration