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

# Create project

> Create a project in your workspace.



## OpenAPI

````yaml post /projects
openapi: 3.0.3
info:
  contact:
    email: support@openlayer.com
    name: Openlayer
    url: https://openlayer.com/
  description: API for interacting with the Openlayer server.
  title: Openlayer API
  version: '1.0'
  x-logo:
    url: https://logo.clearbit.com/openlayer.com
servers:
  - url: https://api.openlayer.com/v1
    description: Our prod backend
security:
  - bearerAuth: []
paths:
  /projects:
    post:
      tags:
        - Projects
      summary: Create project
      description: Create a project in your workspace.
      operationId: createProject
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Project'
      responses:
        '201':
          description: Status OK.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Project'
        default:
          $ref: '#/components/responses/UnexpectedError'
      x-codeSamples:
        - lang: python
          source: |
            from openlayer import Openlayer

            client = Openlayer()
            project = client.projects.create(
              name="My Project",
              description="My project description.",
              taskType="llm-base"
            )
        - lang: typescript
          source: |
            import Openlayer from 'openlayer';

            const openlayer = new Openlayer();
            const project = await openlayer.projects.create({
              name: 'My Project',
              description: 'My project description.',
              taskType: 'llm-base'
            });
        - lang: go
          source: >
            package main


            import (
              "context"

              "github.com/openlayer-ai/openlayer-go"
              "github.com/openlayer-ai/openlayer-go/option"
            )


            client := openlayer.NewClient()

            project, err := client.Projects.New(context.TODO(),
            openlayer.ProjectNewParams{
              Name: openlayer.F("My Project"),
              TaskType: openlayer.F(openlayer.ProjectNewParamsTaskTypeLlmBase),
            })

            if err != nil {
              panic(err.Error())
            }
        - lang: java
          source: |
            import com.openlayer.api.client.OpenlayerClient;
            import com.openlayer.api.client.okhttp.OpenlayerOkHttpClient;
            import com.openlayer.api.models.ProjectCreateParams;
            import com.openlayer.api.models.ProjectCreateResponse;

            OpenlayerClient client = OpenlayerOkHttpClient.fromEnv();

            ProjectCreateParams params = ProjectCreateParams.builder()
                .name("My Project")
                .description("My project description.")
                .taskType(ProjectCreateParams.TaskType.LLM_BASE)
                .build();

            ProjectCreateResponse project = client.projects().create(params);
        - lang: curl
          source: |
            curl --request POST \
              --url https://api.openlayer.com/v1/projects \
              --header 'Authorization: Bearer <token>' \
              --header 'Content-Type: application/json' \
              --data '{
                "name": "My Project",
                "description": "My project description.",
                "taskType": "llm-base"
              }'
components:
  schemas:
    Project:
      type: object
      properties:
        id:
          type: string
          format: uuid
          readOnly: true
          description: The project id.
          example: 3fa85f64-5717-4562-b3fc-2c963f66afa6
        workspaceId:
          type: string
          nullable: true
          format: uuid
          readOnly: true
          description: The workspace id.
          example: 055fddb1-261f-4654-8598-f6347ee46a09
        creatorId:
          type: string
          nullable: true
          format: uuid
          readOnly: true
          description: The project creator id.
          example: 589ece63-49a2-41b4-98e1-10547761d4b0
        name:
          type: string
          maxLength: 64
          description: The project name.
          example: My Project
        dateCreated:
          type: string
          format: date-time
          readOnly: true
          description: The project creation date.
          example: '2024-03-22T11:31:01.185Z'
        dateUpdated:
          type: string
          format: date-time
          readOnly: true
          description: The project last updated date.
          example: '2024-03-22T11:31:01.185Z'
        description:
          type: string
          maxLength: 280
          nullable: true
          description: The project description.
          example: My project description.
        source:
          type: string
          readOnly: true
          nullable: true
          enum:
            - web
            - api
            - 'null'
          description: The source of the project.
        taskType:
          type: string
          enum:
            - llm-base
            - tabular-classification
            - tabular-regression
            - text-classification
          description: The task type of the project.
        versionCount:
          type: integer
          minimum: 0
          readOnly: true
          description: The number of versions (commits) in the project.
          example: 2
        inferencePipelineCount:
          type: integer
          minimum: 0
          readOnly: true
          description: The number of inference pipelines in the project.
          example: 1
        goalCount:
          type: integer
          minimum: 0
          readOnly: true
          description: The total number of tests in the project.
          example: 10
        developmentGoalCount:
          type: integer
          minimum: 0
          readOnly: true
          description: The number of tests in the development mode of the project.
          example: 5
        monitoringGoalCount:
          type: integer
          minimum: 0
          readOnly: true
          description: The number of tests in the monitoring mode of the project.
          example: 5
        links:
          type: object
          readOnly: true
          required:
            - app
          properties:
            app:
              type: string
              example: >-
                https://app.openlayer.com/myWorkspace/3fa85f64-5717-4562-b3fc-2c963f66afa6
          description: Links to the project.
        gitRepo:
          $ref: '#/components/schemas/GitRepo'
          readOnly: true
          nullable: true
      required:
        - id
        - workspaceId
        - creatorId
        - name
        - dateCreated
        - dateUpdated
        - source
        - taskType
        - versionCount
        - inferencePipelineCount
        - goalCount
        - developmentGoalCount
        - monitoringGoalCount
        - links
    GitRepo:
      type: object
      properties:
        id:
          type: string
          format: uuid
          readOnly: true
        gitId:
          type: integer
        dateConnected:
          type: string
          format: date-time
          readOnly: true
        dateUpdated:
          type: string
          format: date-time
          readOnly: true
        branch:
          type: string
        name:
          type: string
          readOnly: true
        private:
          type: boolean
          readOnly: true
        slug:
          type: string
          readOnly: true
        url:
          type: string
          format: url
          readOnly: true
        rootDir:
          type: string
        projectId:
          type: string
          format: uuid
          readOnly: true
        gitAccountId:
          type: string
          format: uuid
      required:
        - id
        - gitId
        - dateConnected
        - dateUpdated
        - name
        - private
        - slug
        - url
        - projectId
        - gitAccountId
  responses:
    UnexpectedError:
      description: Unexpected error.
      content:
        application/json:
          schema:
            type: object
            required:
              - code
              - error
            properties:
              code:
                type: integer
                format: int32
              error:
                type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >
        Bearer authentication header of the form `Bearer <token>`, where
        `<token>` is your workspace API key. See [Find your API
        key](https://www.openlayer.com/docs/workspace-and-projects/find-your-api-key)
        for more information.

````