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

> ## Agent Instructions
> The Exa API is served at https://api.exa.ai. Authenticate with `Authorization: Bearer $EXA_API_KEY` (or `x-api-key: $EXA_API_KEY`); create keys at https://dashboard.exa.ai/api-keys?utm_source=docs&utm_medium=docs&utm_campaign=markdown_instructions. Every way an agent can get access to Exa is described at https://exa.ai/auth.md.
> Prefer the official SDKs, `exa-py` (`pip install exa-py`) and `exa-js` (`npm install exa-js`); both read `EXA_API_KEY` from the environment.
> Tool-using agents can call Exa without writing code through the hosted MCP server at https://mcp.exa.ai/mcp, or install the Exa agent skill with `npx skills add exa-labs/agent-skills` (skill file: https://exa.ai/docs/skill.md).
> The OpenAPI specs at https://exa.ai/docs/exa-spec.yaml and https://exa.ai/docs/team-management-spec.yaml are the source of truth for request and response schemas.

# Create an import

> Creates an Import for your own data. Upload the file to the returned `uploadUrl` before `uploadValidUntil`, 1 hour after creation. Use an Import to enrich its records, to search within them with `scope`, or to leave them out of searches with `exclude`.



## OpenAPI

````yaml exa-spec.yaml POST /v0/imports
openapi: 3.1.0
info:
  title: Exa Public API
  version: 2.0.0
servers:
  - url: https://api.exa.ai
security:
  - apiKey: []
  - bearer: []
paths:
  /v0/imports:
    servers:
      - url: https://api.exa.ai/websets
    post:
      tags:
        - Imports
      summary: Create an Import
      description: >-
        Creates an Import for your own data. Upload the file to the returned
        `uploadUrl` before `uploadValidUntil`, 1 hour after creation. Use an
        Import to enrich its records, to search within them with `scope`, or to
        leave them out of searches with `exclude`.
      operationId: imports-create
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateImportParameters'
      responses:
        '201':
          description: Import created successfully
          headers:
            X-Request-Id:
              schema:
                type: string
              description: Unique identifier for the request.
              required: true
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateImportResponse'
      security:
        - apiKey: []
        - bearer: []
components:
  schemas:
    CreateImportParameters:
      discriminator:
        propertyName: format
      oneOf:
        - properties:
            size:
              maximum: 50000000
              description: The size of the file in bytes. Maximum size is 50 MB.
              type: number
            count:
              description: The number of records to import
              type: number
            title:
              description: The title of the import
              type: string
            format:
              enum:
                - csv
              description: >-
                The file format. The CSV must include a column that identifies
                each entity, or the import fails.
              type: string
            metadata:
              description: Set of key-value pairs you want to associate with this object.
              propertyNames:
                maxLength: 250
                type: string
              additionalProperties:
                type: string
                maxLength: 1000
              type: object
            entity:
              $ref: '#/components/schemas/Entity'
              description: The type of entity each row describes.
            csv:
              description: When format is `csv`, these are the specific import parameters.
              properties:
                identifier:
                  description: >-
                    Column containing the key identifier for the entity (e.g.
                    URL, Name, etc.). If not provided, we will try to infer it
                    from the file.
                  minimum: 0
                  type: integer
              type: object
          required:
            - size
            - count
            - format
            - entity
          type: object
    CreateImportResponse:
      properties:
        id:
          description: The unique identifier for the Import
          type: string
        object:
          enum:
            - import
          description: The type of object
          type: string
        status:
          enum:
            - pending
            - processing
            - completed
            - failed
            - canceled
          description: The status of the Import
          type: string
        format:
          enum:
            - csv
            - webset
          description: The format of the import.
          type: string
        entity:
          $ref: '#/components/schemas/Entity'
          description: The type of entity the import contains.
          nullable: true
        title:
          description: The title of the import
          type: string
        count:
          description: The number of entities in the import
          type: number
        metadata:
          description: Set of key-value pairs you want to associate with this object.
          propertyNames:
            maxLength: 250
            type: string
          additionalProperties:
            type: string
            maxLength: 1000
          type: object
        failedReason:
          enum:
            - invalid_format
            - invalid_file_content
            - missing_identifier
          type: string
          description: The reason the import failed
          nullable: true
        failedAt:
          format: date-time
          type: string
          description: When the import failed
          nullable: true
        failedMessage:
          type: string
          description: A human readable message of the import failure
          nullable: true
        createdAt:
          format: date-time
          description: When the import was created
          type: string
        updatedAt:
          format: date-time
          description: When the import was last updated
          type: string
        uploadUrl:
          description: The URL to upload the file to
          type: string
        uploadValidUntil:
          description: >-
            The date and time until the upload URL is valid. The upload URL will
            be valid for 1 hour.
          type: string
      required:
        - id
        - object
        - status
        - format
        - entity
        - title
        - count
        - metadata
        - failedReason
        - failedAt
        - failedMessage
        - createdAt
        - updatedAt
        - uploadUrl
        - uploadValidUntil
      description: An Import with the URL to upload your file to.
      type: object
    Entity:
      oneOf:
        - $ref: '#/components/schemas/CompanyEntity'
        - $ref: '#/components/schemas/PersonEntity'
        - $ref: '#/components/schemas/ArticleEntity'
        - $ref: '#/components/schemas/ResearchPaperEntity'
        - $ref: '#/components/schemas/CustomEntity'
    CompanyEntity:
      properties:
        type:
          type: string
          const: company
          default: company
      required:
        - type
      title: Company
      type: object
    PersonEntity:
      properties:
        type:
          type: string
          const: person
          default: person
      required:
        - type
      title: Person
      type: object
    ArticleEntity:
      properties:
        type:
          type: string
          const: article
          default: article
      required:
        - type
      title: Article
      type: object
    ResearchPaperEntity:
      properties:
        type:
          type: string
          const: research_paper
          default: research_paper
      required:
        - type
      title: Research Paper
      type: object
    CustomEntity:
      properties:
        description:
          minLength: 2
          maxLength: 200
          type: string
        type:
          type: string
          const: custom
          default: custom
      required:
        - type
        - description
      title: Custom
      type: object
  securitySchemes:
    apiKey:
      type: apiKey
      name: x-api-key
      in: header
      description: >-
        Pass your Exa API key in the x-api-key header. You can also authenticate
        with Authorization: Bearer <key>.
    bearer:
      type: http
      scheme: bearer
      description: >-
        Pass your Exa API key in the x-api-key header. You can also authenticate
        with Authorization: Bearer <key>.

````