---
title: "Dbt Docs Gen"
method: POST
path: "/dbt/v2/"
tags: ["DBT_V2"]
---

# Dbt Docs Gen

`POST /dbt/v2/`

Generates Dbt docs for a dbt_model
:param db: The database session for accessing the database.
:param auth: The authorization token for the request.
:param dbt_model: DBTModel.
:return: DBTDocsGenResponse

## Headers

- `x-tenant` string, required

## Request body

- DBTDocsGenRequestV2
  - `columns` string[], nullable
  - `dbt_model` DBTModelInput, required
    - `model_name` string, required
    - `adapter` string, nullable
    - `model_description` string, nullable
    - `compiled_sql` string, nullable
    - `schedule` string, nullable
    - `columns` Column[], nullable
      - `column_name` string, nullable
      - `data_type` string, nullable
      - `description` string, nullable
      - `tests` string[], nullable
    - `dependencies` DBTModelInput[], nullable
  - `gen_model_description` boolean, nullable
  - `user_instructions` UserInstructions
    - `prompt_hint` 'short' | 'long' | 'funny' | 'generate'
    - `language` 'English' | 'German' | 'French' | 'Dutch'
    - `persona` 'Data Analyst' | 'Data Engineer' | 'Data Scientist' | 'Business User' | 'General User' | 'Technical User'
  - `follow_up_instructions` FollowUpInstruction
    - `instruction` string, nullable
  - `column_index_count` integer, nullable
  - `session_id` string, nullable
  - `is_bulk_gen` boolean

## Response `200`

Successful Response

- DBTDocsGenResponse
  - `model_description` string, nullable
  - `column_descriptions` union[], nullable
    - union
      - object
      - ColumnDescription
        - `column_name` string, required
        - `column_description` string, required
        - `column_citations` Citation[], nullable
          - `id` string, required
          - `content` string, required
          - `taskLabel` string, required
  - `model_citations` Citation[], nullable
    - `id` string, required
    - `content` string, required
    - `taskLabel` string, required
  - `chain_of_thought` string, nullable

## Other responses

- `400` — Not supported for public user
- `403` — Not supported for public user
- `422` — Validation Error

---

[API](https://skmtc.net/myaltimate/apis/fastapi.md) · [All operations](https://skmtc.net/myaltimate/apis/fastapi/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/myaltimate/fastapi/versions/aab3fe5c9f05/schema)
