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

# Create dataset

> Create dataset



## OpenAPI

````yaml https://api.gbase.ai/openapi-redoc.json post /v1/datasets
openapi: 3.1.0
info:
  title: GBase
  description: >
    # Introduce

    This API document can help you understand GBase more deeply. 

    You can train your own AI directly through the interface of this document.



    ##  Authentication


    Home page: [https://gbase.ai](https://gbase.ai)


    Huggingface:
    [https://huggingface.co/gptbase](https://huggingface.co/gptbase)


    The GBase API uses API keys for authentication. Visit your API Keys page to
    retrieve the API key you'll use in your requests.


    Remember that your API key is a secret! Do not share it with others or
    expose it in any client-side code (browsers, apps). 

    Production requests must be routed through your own backend server where
    your API key can be securely loaded from an environment variable or key
    management service.


    All API requests should include your API key in an Authorization HTTP header
    as follows:


    Parameter name: Authorization


    Value: Bearer [YOUR_API_KEY](https://admin.gbase.ai/keys)


    ```

    Authorization: Bearer YOUR_API_KEY

    ```


    ## Use steps

    1.Fill in your API keys.


    2.You can create an AI by using either the API interface or the
    administrative backend. Once created, the AI will generate an ID which will
    be required for the subsequent steps.


    3.Use the generated ID to call the file upload interface.


    4.After uploading the file, you can use the question interface to inquire
    about it.
  version: 0.0.1
servers:
  - url: https://api.gbase.ai
security: []
paths:
  /v1/datasets:
    post:
      tags:
        - Datasets
      summary: Create dataset
      description: Create dataset
      operationId: create_dataset_v1_datasets_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DatasetIn'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DatasetOut'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - Auth0ImplicitBearer: []
        - Auth0HTTPBearer: []
        - HTTPBearer: []
components:
  schemas:
    DatasetIn:
      properties:
        name:
          type: string
          maxLength: 255
          title: Name
        description:
          type: string
          title: Description
          nullable: true
        url_rules:
          title: Url Rules
        organization_id:
          type: string
          maxLength: 100
          title: Organization Id
          nullable: true
        id:
          type: string
          title: Id
        embedding_model_name:
          type: string
          title: Embedding Model Name
        embedding_dimensions:
          type: integer
          exclusiveMaximum: 3072
          minimum: 1
          title: Embedding Dimensions
        company_id:
          type: string
          title: Company Id
      additionalProperties: false
      type: object
      required:
        - name
      title: DatasetIn
    DatasetOut:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        created_at:
          type: string
          format: date-time
          title: Created At
          readOnly: true
        updated_at:
          type: string
          format: date-time
          title: Updated At
          readOnly: true
        data_status:
          type: string
          maxLength: 14
          title: Data Status
          description: >-
            INIT: init<br/>READY: ready<br/>CLONING_TARGET:
            cloning_target<br/>CLONING_SOURCE:
            cloning_source<br/>CLONING_FAILED: cloning_failed<br/>FROZEN: frozen
          default: init
        name:
          type: string
          maxLength: 255
          title: Name
        description:
          type: string
          title: Description
          nullable: true
        metadata:
          title: Metadata
        url_rules:
          title: Url Rules
        robots:
          items:
            $ref: '#/components/schemas/mygpt.models.Robot.4baxuf'
          type: array
          title: Robots
        user_id:
          type: string
          maxLength: 100
          title: User Id
        company_id:
          type: string
          title: Company Id
          description: Alias for organization_id for API compatibility
      additionalProperties: false
      type: object
      required:
        - created_at
        - updated_at
        - name
        - robots
        - user_id
      title: DatasetOut
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    mygpt.models.Robot.4baxuf:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        created_at:
          type: string
          format: date-time
          title: Created At
          readOnly: true
        name:
          type: string
          maxLength: 100
          title: Name
        discrible:
          type: string
          title: Discrible
          nullable: true
        subject_name:
          type: string
          title: Subject Name
          nullable: true
        prompt:
          type: string
          title: Prompt
          nullable: true
        robot_type:
          type: string
          maxLength: 100
          title: Robot Type
          description: >-
            RAG: rag<br/>DIGITAL_HUMAN: digital_human<br/>AGENT:
            agent<br/>CATALOG_AGENT: catalog_agent<br/>GENERAL_AGENT:
            general_agent<br/>GBASECLAW: gbaseclaw
          default: rag
        ai_type:
          type: string
          maxLength: 20
          title: Ai Type
          description: >-
            DEFAULT: default<br/>DEMO: demo<br/>PUBLIC: public<br/>PRIVATE:
            private<br/>TRENDING: trending
          default: private
        ai_model:
          type: string
          maxLength: 20
          title: Ai Model
          description: >-
            FILE: file<br/>WEBSITE: website<br/>DIGITAL_HUMAN:
            digital_human<br/>AGENT: agent
          default: file
        ai_status:
          type: string
          maxLength: 20
          title: Ai Status
          description: >-
            INIT: init<br/>READY: ready<br/>FROZEN: frozen<br/>CLONING_SOURCE:
            cloning_source<br/>CLONING_TARGET:
            cloning_target<br/>CLONING_FAILED: cloning_failed
          default: ready
        organization_id:
          type: string
          maxLength: 100
          title: Organization Id
          nullable: true
        apis:
          items:
            $ref: '#/components/schemas/mygpt.models.AgentFunctionCallApi.leaf'
          type: array
          title: Apis
        user_id:
          type: string
          maxLength: 100
          title: User Id
      additionalProperties: false
      type: object
      required:
        - created_at
        - name
        - apis
        - user_id
      title: Robot
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    mygpt.models.AgentFunctionCallApi.leaf:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        created_at:
          type: string
          format: date-time
          title: Created At
          readOnly: true
        function_call_name:
          type: string
          maxLength: 255
          title: Function Call Name
          nullable: true
        openapi_url:
          type: string
          maxLength: 255
          title: Openapi Url
          nullable: true
        server_url:
          type: string
          maxLength: 255
          title: Server Url
          nullable: true
        path:
          type: string
          maxLength: 255
          title: Path
          nullable: true
        method:
          type: string
          maxLength: 255
          title: Method
          nullable: true
        header_authorization:
          title: Header Authorization
        function_type:
          type: string
          maxLength: 50
          title: Function Type
          nullable: true
        function_status:
          type: string
          maxLength: 50
          title: Function Status
          nullable: true
        share_status:
          type: string
          maxLength: 50
          title: Share Status
          nullable: true
        user_id:
          type: string
          maxLength: 100
          title: User Id
          nullable: true
        function_call_description:
          type: string
          maxLength: 255
          title: Function Call Description
          nullable: true
        matching_keywords:
          title: Matching Keywords
        llm_sta:
          type: boolean
          title: Llm Sta
          default: true
        body:
          title: Body
        auth_token_curl:
          title: Auth Token Curl
        body_required:
          title: Body Required
        request_explanation:
          type: string
          maxLength: 255
          title: Request Explanation
          nullable: true
      additionalProperties: false
      type: object
      required:
        - created_at
      title: AgentFunctionCallApi
      description: Agent的FunctionCall工具的定义表
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````