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

# Create Flashcard Set



## OpenAPI

````yaml openapis/interactives.json post /v1/interactives/flashcards/create
openapi: 3.1.0
info:
  title: Interactive Routes
  version: 0.0.1
servers:
  - url: https://api.opennote.com
security: []
paths:
  /v1/interactives/flashcards/create:
    post:
      summary: Create Flashcard Set
      operationId: create_flashcard_set_interactives_flashcards_create_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FlashcardCreateRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FlashcardCreateResponse'
        '401':
          description: Invalid API key or unauthorized access
        '402':
          description: Insufficient credits
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '429':
          description: Rate limit exceeded
          headers:
            Retry-After:
              description: Number of seconds to wait before retrying
              schema:
                type: integer
          content:
            application/json:
              schema:
                properties:
                  error:
                    type: string
                type: object
        '500':
          description: Internal server error
      security:
        - HTTPBearer: []
components:
  schemas:
    FlashcardCreateRequest:
      properties:
        set_description:
          type: string
          title: Set Description
          description: >-
            The description of the flashcard set, i.e. what you want to include
            in the set.
        count:
          anyOf:
            - type: integer
              maximum: 30
              minimum: 1
            - type: 'null'
          title: Count
          description: The number of flashcards to generate
          default: 10
        set_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Set Name
          description: >-
            The name of the flashcard set, if you want to provide one. If you do
            not, one will be generated for you at additional cost.
          default: ''
      type: object
      required:
        - set_description
      title: FlashcardCreateRequest
      description: Request model for creating a flashcard set.
    FlashcardCreateResponse:
      properties:
        success:
          type: boolean
          title: Success
        message:
          anyOf:
            - type: string
            - type: 'null'
          title: Message
        set_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Set Name
        flashcards:
          anyOf:
            - items:
                $ref: '#/components/schemas/Flashcard'
              type: array
            - type: 'null'
          title: Flashcards
        timestamp:
          type: string
          title: Timestamp
      type: object
      required:
        - success
      title: FlashcardCreateResponse
      description: Response model for flashcard set creation.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    Flashcard:
      properties:
        front:
          type: string
          title: Front
        back:
          type: string
          title: Back
      type: object
      required:
        - front
        - back
      title: Flashcard
      description: Represents a flashcard.
    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
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````