---
title: "POST /model-hub/optimize-dataset/{model_id}/prompt-template-result/{optimization_id}/"
method: POST
path: "/model-hub/optimize-dataset/{model_id}/prompt-template-result/{optimization_id}/"
tags: ["model-hub"]
---

# POST /model-hub/optimize-dataset/{model_id}/prompt-template-result/{optimization_id}/

`POST /model-hub/optimize-dataset/{model_id}/prompt-template-result/{optimization_id}/`

## Request

- Base URL: `http://localhost:8000`
- URL: `http://localhost:8000/model-hub/optimize-dataset/{model_id}/prompt-template-result/{optimization_id}/`
- Auth: one of:
  - API key in header `X-Api-Key`
  - API key in header `X-Secret-Key`

## Request body

- ModelHubEmptyRequest

## Response `200`

OK

- OptimizeDatasetTemplateResultsResponse
  - `k_prompts` string[], required
  - `results` OptimizeDatasetTemplateResult[], required
    - `metric_name` string, required
    - `templates` number[], required
    - `old_template` number, required

## Other responses

- `400`: Bad Request
- `403`: Forbidden
- `404`: Not Found
- `409`: Conflict
- `500`: Internal Server Error
- `default`: Default error response

---

[API](https://skmtc.dev/futureagi/apis/future-agi-management-api.md) · [All operations](https://skmtc.dev/futureagi/apis/future-agi-management-api/llms.txt) · [OpenAPI document](https://skmtc.dev/futureagi/apis/future-agi-management-api/revisions/c8684118e142?raw)
