---
name: trivia-api
description: "Trivia API skill. Use when working with Trivia for trivia. Covers 6 endpoints."
version: 1.0.0
generator: lapsh
---

# Trivia API
API version: 1.5

## Auth
ApiKey X-Fungenerators-Api-Secret in header

## Base URL
https://api.fungenerators.com/

## Setup
1. Set your API key in the appropriate header
2. GET /trivia -- get a trivia entry for a given id. retrieves a trivia question and answer based on the id.
3. Explore available endpoints below

## Endpoints
6 endpoints across 1 group. See references/api-spec.lap for full details.

### Trivia
| Method | Path | Description |
|--------|------|-------------|
| GET | /trivia | Get a Trivia entry for a given id. Retrieves a trivia question and answer based on the id. |
| PUT | /trivia | Create a random Trivia entry. |
| DELETE | /trivia | Create a random Trivia entry. |
| GET | /trivia/random | Get a random trivia for a given category(optional) |
| GET | /trivia/search | Search for random trivia which has the text in the query, for a given category(optional). |
| GET | /trivia/categories | Get a random Trivia. |

## Common Questions
Match user requests to endpoints in references/api-spec.lap. Key patterns:
- "List all trivia?" -> GET /trivia
- "List all random?" -> GET /trivia/random
- "Search search?" -> GET /trivia/search
- "List all categories?" -> GET /trivia/categories
- "How to authenticate?" -> See Auth section above

## Response Tips
- Check response schemas in references/api-spec.lap for field details
- Create/update endpoints return the modified resource on success
- Error responses include status codes and descriptions in the spec

## References
- Full spec: See references/api-spec.lap for complete endpoint details, parameter tables, and response schemas

> Generated from the official API spec by [LAP](https://lap.sh)
