> ## 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.

# Flashcards API

> Generate AI-powered flashcard sets from any topic or content description.

# Flashcards API

The Opennote Flashcards API creates flashcard sets from any topic description. Simply describe what you want to study and get back ready-to-use flashcards with questions and answers.

## How It Works

<Steps>
  <Step title="Describe Your Topic">
    Tell us what subject or topic you want flashcards for
  </Step>

  <Step title="AI Generation">
    We instantly create flashcard sets with questions and answers
  </Step>

  <Step title="Get Your Flashcards">
    Receive a complete set ready for studying or integration into your app
  </Step>
</Steps>

## Quick Start Example

<CodeGroup>
  ```python Python theme={null}
  from opennote import OpennoteClient

  client = OpennoteClient(api_key="your_editable_api_key")

  # Create flashcards
  response = client.flashcards.create(
      set_description="Basic Spanish vocabulary for beginners",
      count=10
  )

  if response.success:
      print(f"Generated {len(response.flashcards)} flashcards!")
      print(f"Set name: {response.set_name}")
      
      # Show first card
      card = response.flashcards[0]
      print(f"\nFirst card:")
      print(f"Front: {card.front}")
      print(f"Back: {card.back}")
  ```

  ```typescript TypeScript theme={null}
  import { OpennoteClient } from '@opennote-ed/sdk';

  const client = new OpennoteClient('your_editable_api_key');

  // Create flashcards
  const response = await client.flashcards.create({
      set_description: "Basic Spanish vocabulary for beginners",
      count: 10
  });

  if (response.success && response.flashcards) {
      console.log(`Generated ${response.flashcards.length} flashcards!`);
      console.log(`Set name: ${response.set_name}`);
      
      // Show first card
      const card = response.flashcards[0];
      console.log(`\nFirst card:`);
      console.log(`Front: ${card.front}`);
      console.log(`Back: ${card.back}`);
  }
  ```

  ```bash cURL theme={null}
  curl -X POST "https://api.opennote.com/v1/interactives/flashcards/create" \
    -H "Authorization: Bearer your_editable_api_key" \
    -H "Content-Type: application/json" \
    -d '{
      "set_description": "Basic Spanish vocabulary for beginners",
      "count": 10
    }'
  ```
</CodeGroup>

## Configuration Options

Based on the API specification, here are the available parameters:

### `set_description` (required)

Description of the topic you want flashcards for. Be specific about the subject and level.

**Examples:**

* `"Basic Spanish vocabulary for beginners"`
* `"Key concepts in organic chemistry for college students"`
* `"Important dates and events in World War II"`

### `count` (optional)

Number of flashcards to generate (1-30). Default: 10

### `set_name` (optional)

Custom name for the flashcard set. If not provided, one will be generated automatically.

## Support

Need help with flashcards?

* **Technical Issues**: [devtools@opennote.me](mailto:devtools@opennote.me)
* **API Questions**: See our [API Reference](/api-reference/flashcards) for detailed documentation
* **Account Issues**: Visit your [dashboard](https://opennote.com/api/teams) for billing and usage

Ready to create your first flashcard set? Try the [API Playground](https://opennote.com/api/teams) or explore our [SDK documentation](../sdks).
