---
title: "Manually trigger extraction of derived variables from outputs."
method: POST
path: "/model-hub/prompt-templates/{prompt_id}/derived-variables/extract/"
tags: ["model-hub"]
---

# Manually trigger extraction of derived variables from outputs.

`POST /model-hub/prompt-templates/{prompt_id}/derived-variables/extract/`

## Request

- Base URL: `http://localhost:8000`
- URL: `http://localhost:8000/model-hub/prompt-templates/{prompt_id}/derived-variables/extract/`
- Auth: one of:
  - API key in header `X-Api-Key`
  - API key in header `X-Secret-Key`

This is useful when you want to re-extract variables or extract from
existing outputs that weren't processed.

Request body:
    - version: Version to extract from
    - column_name: Name for the output column
    - output_index: Optional specific output index (default: 0)
    - response_format_type: Optional response format hint

## Request body

- DerivedVariableExtractRequest
  - `version` string, required
  - `column_name` string
  - `output_index` integer
  - `response_format_type` string

## Response `200`

OK

- DerivedVariableDetailResponse
  - `status` boolean, required
  - `result` DerivedVariableDetail, required
    - `paths` string[]
    - `schema` object
    - `full_variables` string[]
    - `raw_sample` object, nullable
    - `is_json` boolean

## 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)
