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

# Returns a list of Projects.



## OpenAPI

````yaml /api-reference/openapi.yaml get /projects
openapi: 3.0.3
info:
  title: Totoy API
  description: >-
    Explain documents in simple, plain or detailed language and create Knowledge
    Bases from your documents in 19 languages.
  termsOfService: https://www.totoy.ai
  contact:
    name: Totoy Support
    email: support@totoy.ai
  license:
    name: MIT
    url: https://raw.githubusercontent.com/totoy-ai/totoy-openapi/main/LICENSE
  version: 1.1.5
servers:
  - url: https://api.totoy.ai/v1
security:
  - ApiKeyAuth: []
tags:
  - name: Explanation
    description: >-
      Given a document in any language, an output language and one of three
      language levels, the assistant will return an `Explanation` for this
      document.
  - name: Knowledge Bases
    description: >-
      Create `Knowledge Bases` from document or text `Sources` and chat with an
      assistant about them in 19 languages.
  - name: Sources
    description: >-
      `Sources` are used to upload documents (.pdf, .jpg or .png) or plain texts
      that can be used with features like `Explanation` or `Knowledge Bases.`
  - name: Projects
    description: '`Projects` are used to group `Knowledge Bases` and `Explanations`.'
  - name: Organization
    description: Get information about your `Organization`.
paths:
  /projects:
    get:
      tags:
        - Projects
      summary: Returns a list of Projects.
      operationId: listProjects
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProjectsList'
              examples:
                projects-list-example:
                  $ref: '#/components/examples/projects-list-example'
        4XX:
          $ref: '#/components/responses/general4XXResponse'
        5XX:
          $ref: '#/components/responses/general5XXResponse'
components:
  schemas:
    ProjectsList:
      title: ProjectsList
      description: A list of `Projects`.
      type: object
      additionalProperties: false
      properties:
        data:
          description: A list of `Projects`.
          type: array
          items:
            $ref: '#/components/schemas/Project'
          maxItems: 1500
      required:
        - data
      example:
        data:
          - project_id: pj_avX7imfLaPcQnv5ckvGlOEBA9
            name: Totoy GmbH Project
            created_at: '2023-07-05T12:34:13Z'
            updated_at: '2024-01-05T12:00:00Z'
            knowledge_base_ids:
              - kb_feMfJbeqbAEj4u8K5HqmKpUbY
              - kb_kfjd34sfgsd2gfskijuh23zgt
            is_default: false
          - project_id: pj_bxW8jnfoMbRQow6dlHmPIRCA2
            name: Default Project
            created_at: '2023-07-05T12:34:13Z'
            updated_at: '2023-07-05T12:34:13Z'
            knowledge_base_ids: []
            is_default: true
    Project:
      title: Project
      description: >-
        A project is a collection of `Sources` and `Knowledge Bases` with the
        same lifespan. If a project is deleted, all associated resources will
        also be deleted. `Explanations` can also be assigned to `Projects` for
        billing purposes.
      type: object
      additionalProperties: false
      properties:
        project_id:
          description: The unique identifier of a `Project`
          maxLength: 28
          pattern: ^pj_[a-zA-Z0-9]{25}$
          type: string
          example: pj_avX7imfLaPcQnv5ckvGlOEBA9
        name:
          description: The name of the `Project`
          type: string
          maxLength: 256
          example: Totoy GmbH Project
        created_at:
          description: Date-time of when the `Project` was created, in ISO 8601 format
          type: string
          format: date-time
          example: '2023-07-05T12:34:13Z'
        updated_at:
          description: >-
            Date-time of when the `Project` was last modified, in ISO 8601
            format
          type: string
          format: date-time
          example: '2023-07-05T12:34:13Z'
        knowledge_base_ids:
          description: >-
            A list of `knowledge_base_ids` that are assigned to the `Project`.
            One `Project` can have multiple `Knowledge Bases`.
          type: array
          items:
            type: string
            maxLength: 28
            pattern: ^kb_[a-zA-Z0-9]{25}$
          maxItems: 1500
          example: []
        source_ids:
          description: >-
            A list of `source_ids` of `Sources` that are assigned to the
            `Project`.
          type: array
          items:
            type: string
            maxLength: 29
            pattern: ^src_[a-zA-Z0-9]{25}$
            description: >-
              Unique identifier for a `Source` that is assigned to the
              `Project`.
          maxItems: 10000
          example:
            - src_oXiYDg8QOc9JsOk86idRXiywD
            - src_qoY7rSGkiWtn4NP8kPXc7xzrq
        is_default:
          description: >-
            Whether the `Project` is the default `Project` for the
            `Organization`. The default `Project` is used when no `Project` is
            specified in an API request. The default `Project` cannot be
            deleted.
          type: boolean
          example: false
        usage:
          description: The usage of the `Project`.
          type: object
          properties:
            assistant_messages:
              description: >-
                The number of `Messages` with the role `assistant`, used by the
                `Project` in the current billing period.
              type: object
              properties:
                knowledge_bases_chats:
                  description: >-
                    The number of `Knowledge Base Chat Messages` with the role
                    `assistant`, used by the `Project` in the current billing
                    period.
                  type: integer
                  example: 1354
                explanations:
                  description: >-
                    The number of `Explanation Messages` with the role
                    `assistant`, used by the `Project` in the current billing
                    period.
                  type: integer
                  example: 1234
                total:
                  description: >-
                    The total number of `Messages` with the role `assistant`,
                    used by the `Project` in the current billing period.
                  type: integer
                  example: 2588
            document_sources_pages:
              description: The number of `Document Sources` pages stored in the `Project`.
              type: integer
              example: 2534
            text_sources:
              description: The amount of `Text Sources` stored in the `Project`.
              type: integer
              example: 3756
          example:
            assistant_messages:
              knowledge_bases_chats: 1354
              explanations: 1234
              total: 2588
            document_sources_pages: 2534
            text_sources: 3756
      required:
        - project_id
        - name
        - created_at
        - updated_at
        - knowledge_base_ids
        - source_ids
        - is_default
    Problem:
      title: Problem
      description: A Response Body for HTTP Problem Details in RFC 9457 format.
      type: object
      additionalProperties: false
      properties:
        type:
          description: A URI reference that identifies the problem type.
          type: string
          maxLength: 512
          example: https://docs.totoy.ai/probs/out-of-credit
        title:
          description: A short, human-readable summary of the problem type.
          type: string
          maxLength: 512
          example: You do not have enough credit.
        status:
          description: >-
            The HTTP status code generated by the origin server for this
            occurrence of the problem.
          type: integer
          format: int32
          example: 403
        detail:
          description: >-
            A human-readable explanation specific to this occurrence of the
            problem.
          type: string
          maxLength: 4096
          example: You do not have enough credit to perform this operation.
        instance:
          description: >-
            A URI reference that identifies the specific occurrence of the
            problem.
          type: string
          maxLength: 512
          example: /projects/pj_avX7imfLaPcQnv5ckvGlOEBA9
  examples:
    projects-list-example:
      summary: Projects List Example
      description: An example for a list of `Projects`.
      value:
        data:
          - project_id: pj_avX7imfLaPcQnv5ckvGlOEBA9
            name: Totoy GmbH Project
            created_at: '2023-07-05T12:34:13Z'
            updated_at: '2024-01-05T12:00:00Z'
            knowledge_base_ids:
              - kb_feMfJbeqbAEj4u8K5HqmKpUbY
              - kb_kfjd34sfgsd2gfskijuh23zgt
            source_ids:
              - src_oXiYDg8QOc9JsOk86idRXiywD
              - src_qoY7rSGkiWtn4NP8kPXc7xzrq
            is_default: false
            usage:
              assistant_messages:
                knowledge_bases_chats: 1354
                explanations: 1234
                total: 2588
              document_sources_pages: 2534
              text_sources: 3756
          - project_id: pj_bxW8jnfoMbRQow6dlHmPIRCA2
            name: Default Project
            created_at: '2023-07-05T12:34:13Z'
            updated_at: '2023-07-05T12:34:13Z'
            knowledge_base_ids: []
            source_ids: []
            is_default: true
            usage:
              assistant_messages:
                knowledge_bases_chats: 4321
                explanations: 5634
                total: 9955
              document_sources_pages: 5342
              text_sources: 7563
  responses:
    general4XXResponse:
      description: Client Error
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Problem'
    general5XXResponse:
      description: Server Error
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Problem'
  securitySchemes:
    ApiKeyAuth:
      type: http
      scheme: bearer

````