---
title: "Infer Fields"
method: POST
path: "/v1/generate/fields/infer-fields"
tags: ["generate"]
---

# Infer Fields

`POST /v1/generate/fields/infer-fields`

## Request

- Base URL: `https://api.pioneer.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.pioneer.ai/v1/generate/fields/infer-fields`
- Auth: one of:
  - API key in header `X-API-Key`
  - HTTP bearer
- TypeScript: <https://skmtc.dev/pioneer/apis/brain-api/docs/v1/generate/fields/infer-fields/post.ts> (a function with typed inputs; its response is checked against the schema)

Infer input and output fields from a domain description.

## Request body

- InferFieldsRequest: Request to infer fields from domain description
  - `user_id` string, nullable: User ID (optional, uses authenticated user if not provided)
  - `domain_description` string, required: Domain description for field inference

## Response `200`

Successful Response

- InferFieldsResponse: Field inference response
  - `success` boolean, required
  - `input_fields` RecordField[], required
    - `name` string, required
    - `type` string
    - `description` string, nullable
    - `allowed_values` string[], nullable
  - `output_fields` RecordField[], required
    - `name` string, required
    - `type` string
    - `description` string, nullable
    - `allowed_values` string[], nullable
  - `mode` string, required
  - `reasoning` string, required

## Other responses

- `422`: Validation Error

## Changes

- **2026-09-24** `0e5e86e2bae5`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/pioneer/apis/brain-api/changes/v1/generate/fields/infer-fields/post.md)

---

[API](https://skmtc.dev/pioneer/apis/brain-api.md) - [All operations](https://skmtc.dev/pioneer/apis/brain-api/llms.txt) - [OpenAPI document](https://skmtc.dev/pioneer/apis/brain-api/revisions/0e5e86e2bae5?raw)
