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

# Get Datasets



## OpenAPI

````yaml GET /datasets
openapi: 3.0.1
info:
  title: FlexAI API
  description: API for managing datasets, fine-tuning models, and handling ML tasks
  version: 1.0.0
servers:
  - url: https://api.getflex.ai/v1
security:
  - bearerAuth: []
paths:
  /datasets:
    get:
      summary: List Datasets
      operationId: listDatasets
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Dataset'
        '500':
          $ref: '#/components/responses/InternalServerError'
components:
  schemas:
    Dataset:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        train_rows_count:
          type: integer
        eval_rows_count:
          type: integer
        max_tokens:
          type: integer
        total_tokens:
          type: integer
        train_path:
          type: string
        eval_path:
          type: string
        type:
          type: string
        user_id:
          type: string
    Error:
      type: object
      required:
        - error
        - message
      properties:
        error:
          type: integer
          format: int32
        message:
          type: string
  responses:
    InternalServerError:
      description: Unexpected error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````