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

# Create a project

> Requires a user API key and a positive credits balance (or a usage-based subscription). See https://mathify.dev/pricing.



## OpenAPI

````yaml /openapi.json post /projects
openapi: 3.1.0
info:
  title: Mathify API
  version: 1.0.0
  description: >-
    Public REST API for generating and retrieving Mathify math animations. See
    app/api/v1/README.md in the source repo for the underlying implementation.
servers:
  - url: https://mathify.dev/api/v1
security: []
tags:
  - name: Projects
  - name: Messages
  - name: Fragments
  - name: Music
  - name: Evals
paths:
  /projects:
    post:
      tags:
        - Projects
      summary: Create a project
      description: >-
        Requires a user API key and a positive credits balance (or a usage-based
        subscription). See https://mathify.dev/pricing.
      operationId: createProject
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateProjectBody'
      responses:
        '201':
          description: Project created
          content:
            application/json:
              schema:
                type: object
                properties:
                  project:
                    $ref: '#/components/schemas/CreatedProject'
                required:
                  - project
                additionalProperties: false
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Missing or invalid API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: >-
            A valid API key is required, or the account has no credits balance
            (see https://mathify.dev/pricing)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - apiKeyHeader: []
        - bearerAuth: []
components:
  schemas:
    CreateProjectBody:
      type: object
      properties:
        name:
          description: >-
            Defaults to a random slug, or an AI-generated title derived from
            `prompt`.
          type: string
        prompt:
          type: string
    CreatedProject:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        userId:
          type: string
        createdAt:
          type: string
          format: date-time
          pattern: >-
            ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
        updatedAt:
          type: string
          format: date-time
          pattern: >-
            ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
      required:
        - id
        - name
        - userId
        - createdAt
        - updatedAt
      additionalProperties: false
    ErrorResponse:
      type: object
      properties:
        error:
          example: Project not found
          type: string
      required:
        - error
      additionalProperties: false
  securitySchemes:
    apiKeyHeader:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        Your Mathify API key (`mk_live_<64 hex chars>`), generated at
        /settings/api-keys.
    bearerAuth:
      type: http
      scheme: bearer
      description: 'Same token as apiKeyHeader, passed as `Authorization: Bearer <token>`.'

````