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

# Generate model from text

> Generate 3D models from a text prompt. Supports model count, mesh quality, target face count, and mesh-only output. Existing defaults are preserved when the new options are omitted.



## OpenAPI

````yaml /openapi.old.json post /api/generateModelWithText
openapi: 3.0.3
info:
  title: Neural4D Management API
  description: Management endpoints for Neural4D, including request and response examples.
  version: 1.5.4
servers:
  - url: https://alb.neural4d.com:3000
    description: Production server
security:
  - bearerAuth: []
tags:
  - name: text-to-3d
    description: Create 3D models from text prompts.
    x-group: Text to 3D
  - name: image-to-3d
    description: Create 3D models from uploaded images.
    x-group: Image to 3D
  - name: model-management
    description: Retrieve finished models, track jobs, and convert model formats.
    x-group: Model management
  - name: media-generation
    description: Generate pictures and videos and query their results.
    x-group: Picture and video generation
  - name: account-and-validation
    description: Check portrait inputs and query remaining points.
    x-group: Account and validation
paths:
  /api/generateModelWithText:
    post:
      tags:
        - text-to-3d
      summary: Generate model from text
      description: >-
        Generate 3D models from a text prompt. Supports model count, mesh
        quality, target face count, and mesh-only output. Existing defaults are
        preserved when the new options are omitted.
      operationId: generateModelWithText
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GenerateModelWithTextRequest'
            examples:
              default:
                value:
                  prompt: people
                  modelCount: 1
                  disablePbr: 0
                  onlyGenerateMesh: false
                  mesh_quality: high
                  faceNum: 1000000
      responses:
        '200':
          description: >-
            Generation job accepted, or the request was rejected by content
            moderation.
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/GenerateModelWithTextResponse'
                  - $ref: '#/components/schemas/GenerationModerationResponse'
              examples:
                generating:
                  value:
                    type: sys
                    message: Generating
                    uuids:
                      - f47ac10b-58cc-4372-a567-0e02b2c3d479
                    generationConfig:
                      faceNum:
                        default: 1000000
                        min: 500000
                        max: 1000000
                        value: 1000000
                    uploadedImageUrl: null
                moderated:
                  value:
                    limitType: 3
                    message: Please check the prompt.
        '400':
          description: Invalid request parameter.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiValidationErrorResponse'
              example:
                errors:
                  - type: field
                    value: 5
                    msg: modelCount must be an integer between 1 and 4 (inclusive)
                    path: modelCount
                    location: body
        '401':
          description: Authentication failed.
          content:
            text/plain:
              schema:
                type: string
              example: Unauthorized
        '402':
          description: The request was blocked by an account, IP, or credit restriction.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                message: Insufficient points or account restricted
        '403':
          description: The current account is not allowed to run this generation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                message: Generation is not available for the current account
        '429':
          description: Rate limit exceeded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                message: >-
                  Too many requests from this user, please try again after a
                  minute.
        '500':
          description: Generation or internal service unavailable.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
              example:
                error: Internal server error
components:
  schemas:
    GenerateModelWithTextRequest:
      type: object
      required:
        - prompt
      properties:
        prompt:
          type: string
          description: Text prompt used to generate the 3D model.
          example: people
          minLength: 1
        modelCount:
          type: integer
          minimum: 1
          default: 4
          description: Number of models to generate.
          maximum: 4
        disablePbr:
          type: integer
          enum:
            - 0
            - 1
          default: 0
          description: PBR toggle. Use `0` to enable PBR and `1` to disable it.
        onlyGenerateMesh:
          type: boolean
          default: false
          description: Whether to generate only the mesh, without texture or PBR output.
        mesh_quality:
          type: string
          enum:
            - standard
            - high
            - extra_high
          default: high
          description: >-
            Mesh quality level. Supported values are standard, high, and
            extra_high.
        faceNum:
          type: integer
          minimum: 100000
          maximum: 1000000
          description: >-
            Target face count. standard accepts 100000 to 500000 and defaults to
            500000; high and extra_high accept 500000 to 1000000 and default to
            1000000.
      oneOf:
        - required:
            - mesh_quality
          properties:
            mesh_quality:
              type: string
              enum:
                - standard
              description: Standard mesh quality.
            faceNum:
              type: integer
              minimum: 100000
              maximum: 500000
              description: Target face count for standard quality.
        - properties:
            mesh_quality:
              type: string
              enum:
                - high
                - extra_high
              description: >-
                High or extra-high mesh quality; this branch also applies when
                omitted.
            faceNum:
              type: integer
              minimum: 500000
              maximum: 1000000
              description: Target face count for high, extra-high, or default quality.
    GenerateModelWithTextResponse:
      type: object
      required:
        - type
        - message
        - uuids
        - uploadedImageUrl
      properties:
        type:
          type: string
          description: Response source or type marker.
          example: sys
          enum:
            - sys
        message:
          type: string
          description: Generation status message.
          example: Generating
          enum:
            - Generating
        uuids:
          type: array
          description: Generated UUIDs that can be used later to retrieve the models.
          items:
            type: string
            format: uuid
          minItems: 1
          maxItems: 4
        pointsDeducted:
          type: integer
          nullable: true
          description: Credits deducted when the value is available.
        generationConfig:
          allOf:
            - $ref: '#/components/schemas/GenerationConfig'
          nullable: true
          description: >-
            Normalized face-count configuration applied to this generation
            request.
        uploadedImageUrl:
          type: string
          format: uri
          nullable: true
          description: Always null for text-only generation.
    GenerationModerationResponse:
      type: object
      required:
        - limitType
        - message
      properties:
        limitType:
          type: integer
          enum:
            - 3
            - 4
          description: Content moderation result code.
        message:
          type: string
          description: Content moderation message.
    ApiValidationErrorResponse:
      type: object
      required:
        - errors
      properties:
        errors:
          type: array
          items:
            $ref: '#/components/schemas/ApiValidationErrorItem'
          description: Request validation errors.
    ApiErrorResponse:
      type: object
      properties:
        message:
          type: string
          description: Human-readable API error message.
        error:
          type: string
          description: Internal or downstream error description when available.
    GenerationConfig:
      type: object
      required:
        - faceNum
      properties:
        faceNum:
          $ref: '#/components/schemas/GenerationFaceNumConfig'
          description: >-
            Face-count limits and the normalized value applied to the generation
            task.
    ApiValidationErrorItem:
      type: object
      required:
        - msg
        - path
        - location
      properties:
        type:
          type: string
          description: Validation error category.
        value:
          nullable: true
          description: Rejected request value when it is available.
        msg:
          type: string
          description: Human-readable validation error message.
        path:
          type: string
          description: Request field that failed validation.
        location:
          type: string
          description: Request location containing the invalid field.
    GenerationFaceNumConfig:
      type: object
      required:
        - default
        - min
        - max
        - value
      properties:
        default:
          type: integer
          description: Default face count for the selected mesh quality.
        min:
          type: integer
          description: Minimum face count for the selected mesh quality.
        max:
          type: integer
          description: Maximum face count for the selected mesh quality.
        value:
          type: integer
          description: Normalized face count applied to the generation task.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Use the bearer token provided through the Neural4D website.
      x-default: YOUR_TOKEN

````