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

# Fill mask predictions



## OpenAPI

````yaml /api-reference/openapi.json post /v1/fill-mask
openapi: 3.1.0
info:
  title: SynapsAI Inference API
  version: 1.0.0
servers:
  - url: https://api.synapsai.cloud
    description: Production server
security: []
paths:
  /v1/fill-mask:
    post:
      summary: Fill mask predictions
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FillMaskRequest'
      responses:
        '200':
          description: Filled sequences with scores
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    sequence:
                      type: string
                    score:
                      type: number
                    token:
                      type: integer
                    token_str:
                      type: string
components:
  schemas:
    FillMaskRequest:
      allOf:
        - type: object
          description: Request to fill masked tokens in text.
          properties:
            inputs:
              oneOf:
                - type: string
                - type: array
                  items:
                    type: string
              description: >-
                Text or list of texts containing masked tokens to be filled.
                Required.
            targets:
              oneOf:
                - type: string
                - type: array
                  items:
                    type: string
              nullable: true
              description: >-
                Optional list of candidate target strings to constrain the mask
                filling.
            top_k:
              type: integer
              default: 5
              description: Number of top predictions to return per masked position.
          required:
            - inputs

````