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

# Quickstart

> Create an organization, upload a source, and generate resources.

## 1. Create organization and API key

```bash theme={null}
curl -X POST "https://api.getconch.ai/v1/createOrganization" \
  -H "Content-Type: application/json" \
  -H "admin-key: YOUR_ADMIN_KEY" \
  -d '{
    "name": "Acme Learning",
    "url": "https://acme.example"
  }'
```

Response includes `organization` and `apiKey`.

## 2. Request upload URL for source

```bash theme={null}
curl -X POST "https://api.getconch.ai/v1/sources/upload-url" \
  -H "Content-Type: application/json" \
  -H "x-api-key: YOUR_ISSUED_API_KEY" \
  -d '{
    "fileName": "intro-biology.pdf",
    "sourceType": "file"
  }'
```

Response includes:

* `uploadUrl` (S3 pre-signed URL)
* `fileKey`
* `sourceId`

## 3. Upload the file to S3 using the pre-signed URL

```bash theme={null}
curl -X PUT "UPLOAD_URL_FROM_STEP_2" \
  -H "Content-Type: application/pdf" \
  --upload-file "./intro-biology.pdf"
```

## 4. Poll source status until it is indexed

```bash theme={null}
curl -X GET "https://api.getconch.ai/v1/sources/SOURCE_ID" \
  -H "x-api-key: YOUR_ISSUED_API_KEY"
```

Repeat until `data.status` becomes `indexed`.

## 5. List sources

```bash theme={null}
curl -X GET "https://api.getconch.ai/v1/sources" \
  -H "x-api-key: YOUR_ISSUED_API_KEY"
```

## 6. Generate a quiz from a source

```bash theme={null}
curl -X POST "https://api.getconch.ai/v1/sources/SOURCE_ID/quizzes" \
  -H "Content-Type: application/json" \
  -H "x-api-key: YOUR_ISSUED_API_KEY" \
  -d '{
    "numberOfQuestions": 10,
    "difficulty": "medium"
  }'
```

## 7. Explore complete API contract

Use the OpenAPI file at `docs/openapi/v1.yaml` for all request/response schemas.
