> ## Documentation Index
> Fetch the complete documentation index at: https://docs.corepillar.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Synthesize an agent blueprint

> Step 2: one model call turns the extracted source into an agent spec, a synthetic system of record and a Markdown artifact. Returns `202` instead of `200` when the model's output was cut short; the usable parts come back with a list of what's missing.

**Auth:** session. **Permission:** `run_agents` or `manage_agents`.



## OpenAPI

````yaml /api-reference/openapi.json post /projects/{projectId}/synthetic/synthesize
openapi: 3.1.0
info:
  title: CorePillar API
  version: 1.0.0
  description: >-
    REST API for AgentHub and ModelHub. Ingestion endpoints authenticate with a
    project tracing key; all other endpoints use the signed-in user's browser
    session.
servers:
  - url: https://pillarforge.corepillar.ai/api/v1
    description: AgentHub
security: []
tags:
  - name: Ingestion
    description: 'Send traces with a tracing key: JSON ingest and OpenTelemetry (OTLP).'
  - name: Traces
    description: Read traces and spans.
  - name: Evaluations
    description: Evaluate traces with evaluator collections.
  - name: Evaluators
    description: Built-in and custom evaluators.
  - name: Evaluator collections
    description: Ordered groups of evaluators.
  - name: Organizations
    description: Organizations you belong to.
  - name: Members
    description: Organization members, invites and roles.
  - name: Projects
    description: Projects inside an organization.
  - name: SSO
    description: Okta SSO configuration.
  - name: Tracing keys
    description: Create, list and revoke project tracing keys.
  - name: Cost calculator
    description: Estimate, generate and execute scenario runs.
  - name: Synthetic
    description: Synthetic agent and data setup from source material.
  - name: Chat
    description: ModelHub chat. Served at https://modelhub.corepillar.ai/api/v1.
  - name: Auth
    description: Sign-in helpers.
  - name: E2E
    description: Internal end-to-end encryption key directory.
paths:
  /projects/{projectId}/synthetic/synthesize:
    post:
      tags:
        - Synthetic
      summary: Synthesize an agent blueprint
      description: >-
        Step 2: one model call turns the extracted source into an agent spec, a
        synthetic system of record and a Markdown artifact. Returns `202`
        instead of `200` when the model's output was cut short; the usable parts
        come back with a list of what's missing.


        **Auth:** session. **Permission:** `run_agents` or `manage_agents`.
      operationId: syntheticSynthesize
      parameters:
        - name: projectId
          in: path
          required: true
          description: Project id.
          schema:
            type: string
            format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - source
              properties:
                source:
                  $ref: '#/components/schemas/ExtractedSource'
                domain:
                  $ref: '#/components/schemas/SyntheticDomain'
      responses:
        '200':
          description: Blueprint.
          content:
            application/json:
              schema:
                type: object
                required:
                  - data
                properties:
                  data:
                    type: object
                    additionalProperties: true
                    properties:
                      partial:
                        type: boolean
        '202':
          description: Partial blueprint.
          content:
            application/json:
              schema:
                type: object
                required:
                  - data
                properties:
                  data:
                    type: object
                    additionalProperties: true
                    properties:
                      partial:
                        type: boolean
                      missing:
                        type: array
                        items:
                          type: string
        '400':
          description: Validation failed. `error.code` is `VALIDATION_ERROR`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '401':
          description: Not signed in (`UNAUTHORIZED`).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '403':
          description: >-
            Not a member of the organization, or missing the required permission
            (`FORBIDDEN`).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '404':
          description: Project not found or not visible to you (`PROJECT_NOT_FOUND`).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '413':
          description: Body or file too large (`VALIDATION_ERROR`).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '415':
          description: '`Content-Type` isn''t `application/json` (`VALIDATION_ERROR`).'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '500':
          description: Unexpected server error (`INTERNAL_ERROR`).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '502':
          description: The model call failed (`INTERNAL_ERROR`).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
      security:
        - session: []
components:
  schemas:
    ExtractedSource:
      type: object
      required:
        - kind
        - text
      properties:
        kind:
          type: string
          enum:
            - text
            - url
            - file
        label:
          type: string
          maxLength: 2048
          default: Pasted text
        title:
          type: string
          maxLength: 300
          default: ''
        format:
          type: string
          enum:
            - markdown
            - text
            - html
            - docx
            - pdf
            - json
          default: text
        text:
          type: string
          minLength: 1
          maxLength: 60000
        chars:
          type: integer
          minimum: 0
          default: 0
        truncated:
          type: boolean
          default: false
        notes:
          type: array
          maxItems: 10
          items:
            type: string
            maxLength: 500
          default: []
    SyntheticDomain:
      type: string
      enum:
        - auto
        - ats
        - crm
        - hrms
        - erp
        - itsm
        - support
      default: auto
      description: >-
        `auto` detects from the source. Others: ATS / recruiting, CRM / sales,
        HRMS / people ops, ERP / finance, ITSM / service desk, customer support.
    ErrorEnvelope:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
              description: Stable machine-readable code. Branch on this, not on `message`.
              examples:
                - VALIDATION_ERROR
            message:
              type: string
              description: Human-readable description. May change.
            details:
              type: object
              additionalProperties: true
              description: Extra context; often empty.
  securitySchemes:
    session:
      type: apiKey
      in: cookie
      name: session
      description: >-
        The session cookie set when you sign in to AgentHub or ModelHub in a
        browser. The cookie name shown here is illustrative. There are no API
        tokens for these endpoints.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.