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

# Create an AI List

> Create an AI-powered list generation job. The AI will search your workspace and generate a list of records matching your natural language query. Use the returned job_id to poll for results.



## OpenAPI

````yaml /api-reference/openapi.json post /v1/context/list/jobs
openapi: 3.0.0
info:
  description: >-
    REST API for accessing and managing your Nex data. Generate API keys from
    the Nex web UI and use them to authenticate requests.
  title: Nex Developer API
  contact: {}
  version: '1.0'
servers:
  - url: https://app.nex.ai/api/developers
security: []
paths:
  /v1/context/list/jobs:
    post:
      tags:
        - AI Lists
      summary: Create an AI List
      description: >-
        Create an AI-powered list generation job. The AI will search your
        workspace and generate a list of records matching your natural language
        query. Use the returned job_id to poll for results.
      operationId: createAIListJob
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/developer.CreateAIListJobRequest'
        description: AI list generation parameters
        required: true
      responses:
        '200':
          description: Job created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/developer.CreateAIListJobResponse'
        '400':
          description: Bad request - Invalid parameters
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/httpx.APIError'
        '401':
          description: Unauthorized - Invalid or missing API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/httpx.APIError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/httpx.APIError'
      security:
        - ApiKeyAuth: []
components:
  schemas:
    developer.CreateAIListJobRequest:
      type: object
      required:
        - query
      properties:
        query:
          type: string
          description: >-
            Natural language query to search items (e.g., 'all companies', 'high
            priority contacts')
        object_type:
          type: string
          description: >-
            Type of object to search - 'contact' or 'company' (default:
            'contact')
        limit:
          type: integer
          description: 'Number of results (default: 50, max: 100)'
          default: 50
        include_attributes:
          type: boolean
          description: >-
            If true, includes all entity attribute values in response (default:
            false)
          default: false
      example:
        query: all companies who have asked for a contract
        object_type: company
        limit: 20
        include_attributes: true
    developer.CreateAIListJobResponse:
      type: object
      properties:
        message:
          type: object
          description: Response wrapper
          properties:
            job_id:
              type: string
              description: Unique identifier for the list generation job
            status:
              type: string
              enum:
                - pending
              description: Initial job status (always 'pending')
      example:
        message:
          job_id: '12345678901234567'
          status: pending
    httpx.APIError:
      type: object
      properties:
        code:
          type: integer
        message:
          type: string
  securitySchemes:
    ApiKeyAuth:
      description: 'API key for authentication (format: "Bearer YOUR_API_KEY")'
      type: apiKey
      name: Authorization
      in: header

````