---
title: "POST /api/hyperion/courses/{courseId}/problem-statements/refine/targeted"
method: POST
path: "/api/hyperion/courses/{courseId}/problem-statements/refine/targeted"
tags: ["hyperion-problem-statement"]
---

# POST /api/hyperion/courses/{courseId}/problem-statements/refine/targeted

`POST /api/hyperion/courses/{courseId}/problem-statements/refine/targeted`

## Path parameters

- `courseId` integer, required

## Request body

- ProblemStatementTargetedRefinementRequest — Request to refine a problem statement using targeted selection-based instructions
  - `problemStatementText` string, required — Original problem statement text to be refined (max 50,000 chars)
  - `startLine` integer, required — Start line number (1-indexed)
  - `endLine` integer, required — End line number (1-indexed, inclusive)
  - `startColumn` integer — Start column within start line (1-indexed, optional for character-level targeting)
  - `endColumn` integer — End column within end line (1-indexed, exclusive — points after the last selected character, optional for character-level targeting)
  - `instruction` string, required — Instruction describing what should change

## Response `200`

OK

- ProblemStatementRefinementResponse — Response containing refined problem statement
  - `refinedProblemStatement` string — Refined problem statement text

## Changes

- **2026-05-02** `039041cdc17b` — 2 breaking
  - the `instruction` request property's minLength was increased from `0` to `1`
  - the `problemStatementText` request property's minLength was increased from `0` to `1`
- **2026-03-02** `096afb6ee792` — 1 info
  - endpoint added
- **2025-06-29** `afd4091eb170` — 1 breaking
  - api path removed without deprecation

[Change history](https://skmtc.dev/ls1intum/apis/artemis-application-server-api/changes/api/hyperion/courses/:courseId/problem-statements/refine/targeted/post.md)

---

[API](https://skmtc.dev/ls1intum/apis/artemis-application-server-api.md) · [All operations](https://skmtc.dev/ls1intum/apis/artemis-application-server-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/ls1intum/artemis-application-server-api/revisions/cecac5f6c8e5/schema)
