---
title: "Generate Goals Endpoint"
method: POST
path: "/v1/generate-goals"
tags: ["Goals"]
---

# Generate Goals Endpoint

`POST /v1/generate-goals`

Generate high-level goals for a given agent based on its description and knowledge base.

## Headers

- `X-API-Key` string, required

## Request body

- GenerateGoalsRequest — Request model for generating goals
  - `agent_id` string, required — ID of the agent to generate goals for
  - `count` integer — Number of goals to generate
  - `prompt_id` string, uuid, nullable — ID of the prompt to use for goal generation
  - `knowledge_base_id` string, uuid, nullable — ID of the knowledge base to use for goal generation
  - `custom_prompt` string, nullable — Custom instructions for goal generation

## Response `200`

Successful Response

- unknown

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/getbluejay/apis/bluejay-api.md) · [All operations](https://skmtc.net/getbluejay/apis/bluejay-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/getbluejay/bluejay-api/revisions/4ef94eeb836d/schema)
