> ## 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.

# Generate upload urls



## OpenAPI

````yaml POST /datasets/generate_upload_urls
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/generate_upload_urls:
    post:
      summary: Generate Upload URLs for Dataset Files
      operationId: generateUploadUrls
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DatasetRequest'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  train_upload_url:
                    type: string
                  eval_upload_url:
                    type: string
        '500':
          $ref: '#/components/responses/InternalServerError'
components:
  schemas:
    DatasetRequest:
      type: object
      properties:
        id:
          type: string
        name:
          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

````