---
title: "POST /api/hyperion/programming-exercises/{exerciseId}/generate-code"
method: POST
path: "/api/hyperion/programming-exercises/{exerciseId}/generate-code"
tags: ["hyperion-code-generation"]
---

# POST /api/hyperion/programming-exercises/{exerciseId}/generate-code

`POST /api/hyperion/programming-exercises/{exerciseId}/generate-code`

## Path parameters

- `exerciseId` integer, required

## Request body

- CodeGenerationRequest
  - `repositoryType` 'exercise' | 'solution' | 'tests' | 'auxiliary' | 'user'
  - `checkOnly` boolean
  - `initialAutoGeneration` boolean
  - `selectedFeedbackThreadIds` integer[]

## Response `200`

OK

- CodeGenerationJobStart
  - `jobId` string
  - `repositoryType` 'exercise' | 'solution' | 'tests' | 'auxiliary' | 'user'

## Changes

> 37 revisions in range; 2 could not be searched.

- **2026-05-27** `594607213668` — 1 info
  - added the new optional request property `selectedFeedbackThreadIds`
- **2026-05-15** `322715dc6959` — 1 info
  - added the new optional request property `initialAutoGeneration`
- **2026-04-08** `7e309fe8df4f` — 1 info
  - added the optional property `repositoryType` to the response with the `200` status
- **2026-02-23** `0447cb75bafb` — 2 info
  - added the new optional request property `checkOnly`
  - the request property `repositoryType` became optional
- **2026-02-05** `428a7b266894` — 5 breaking, 5 info
  - the request property `repositoryType` became required
  - removed the enum value `SOLUTION` of the request property `repositoryType`
  - removed the enum value `TEMPLATE` of the request property `repositoryType`
  - removed the enum value `TESTS` of the request property `repositoryType`
  - …6 more

[Full history](https://skmtc.dev/ls1intum/apis/artemis-application-server-api/changes/api/hyperion/programming-exercises/:exerciseId/generate-code/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)
