diff --git a/.gitignore b/.gitignore
index 8196715..0054cba 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,4 @@
-# Byte-compiled / optimized / DLL files
+# Python
 __pycache__/
 *.py[cod]
 *$py.class
@@ -26,118 +26,16 @@ share/python-wheels/
 *.egg
 MANIFEST
 
-# PyInstaller
-*.manifest
-*.spec
-
-# Installer logs
-pip-log.txt
-pip-delete-this-directory.txt
-
-# Unit test / coverage reports
-htmlcov/
-.tox/
-.nox/
-.coverage
-.coverage.*
-.cache
-nosetests.xml
-coverage.xml
-*.cover
-*.py,cover
-.hypothesis/
-.pytest_cache/
-cover/
-
-# Translations
-*.mo
-*.pot
-
-# Django stuff:
-*.log
-local_settings.py
-db.sqlite3
-db.sqlite3-journal
-
-# Flask stuff:
-instance/
-.webassets-cache
-
-# Scrapy stuff:
-.scrapy
-
-# Sphinx documentation
-docs/_build/
-
-# PyBuilder
-.pybuilder/
-target/
-
-# Jupyter Notebook
-.ipynb_checkpoints
-
-# IPython
-profile_default/
-ipython_config.py
-
-# pyenv
-.python-version
-
-# pipenv
-Pipfile.lock
-
-# poetry
-poetry.lock
-
-# pdm
-.pdm.toml
-.pdm-python
-.pdm-build/
-
-# PEP 582
-__pypackages__/
-
-# Celery stuff
-celerybeat-schedule
-celerybeat.pid
-
-# SageMath parsed files
-*.sage.py
-
-# Environments
+# Virtual Environment
 .env
-.venv
+.venv/
 env/
 venv/
 ENV/
 env.bak/
 venv.bak/
 
-# Spyder project settings
-.spyderproject
-.spyproject
-
-# Rope project settings
-.ropeproject
-
-# mkdocs documentation
-/site
-
-# mypy
-.mypy_cache/
-.dmypy.json
-dmypy.json
-
-# Pyre type checker
-.pyre/
-
-# pytype static type analyzer
-.pytype/
-
-# Cython debug symbols
-cython_debug/
-
-# IDEs
+# IDE
 .idea/
 .vscode/
 *.swp
@@ -153,4 +51,4 @@ video_scraped/*
 !video_scraped/.gitkeep
 inference_webhook.db
 *.db-journal
-.uv/ 
\ No newline at end of file
+.uv/
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..04286da
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2025 inference.net
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/README.md b/README.md
index 7b4a70b..2e73756 100644
--- a/README.md
+++ b/README.md
@@ -1,148 +1,17 @@
-# Magnus Detection API
+Inference.net Logo
+✨ Navigate at inference.net
 
-A minimalistic API that uses inference.net to detect Magnus Carlsen in images using webhooks, structured outputs, and the slow API for cost-effective processing.
+Example code and guides for accomplishing common tasks with the Inference.net API. To run these examples, you'll need an Inference.net account and associated API key (create a free account here). Set an environment variable called INFERENCE_API_KEY with your API key. Alternatively, in most IDEs such as Visual Studio Code, you can create an .env file at the root of your repo containing INFERENCE_API_KEY=<your API key>, which will be picked up by the notebooks.
 
-## Prerequisites
+Most code examples are written in Python, though the concepts can be applied in any language.
 
-- Python 3.9+
-- ngrok account (free tier is fine)
-- inference.net API key
-- Neon PostgreSQL database
+For other useful tools, guides and courses, check out these related resources:
 
-## Setup
+- [Webhook Example](webhook-example/README.md) - A minimalistic API that uses inference.net to detect Magnus Carlsen in images using webhooks
+- [Batch Processing](https://docs.inference.net/batch-api) - Process multiple asynchronous requests in a single API call
+- [Function Calling](https://docs.inference.net/function-calling) - Use structured outputs with your models
+- [Vision](https://docs.inference.net/vision) - Process images with AI models
+- [Background Inference](https://docs.inference.net/background-inference) - Use the asynchronous API for cost-effective processing
 
-### 0. Provision a Postgres Database
-You can use Neon to do this quickly and easily. 
-
-Once you provision your db, save your connection string for later.
-
-### 1. Clone and Setup Virtual Environment
-
-```bash
-# Clone the repository
-git clone <repository-url>
-cd inference-webhook
-
-# Create virtual environment
-python -m venv .venv
-source .venv/bin/activate  # On Windows: .venv\Scripts\activate
-```
-
-### 2. Install Dependencies
-
-```bash
-pip install -r requirements.txt
-```
-
-### 3. Configure Environment Variables
-
-Create a `.env` file in the `src/` directory:
-
-```bash
-cd src
-cat > .env << EOF
-DATABASE_URL=your_database_url_here
-INFERENCE_API_KEY=your_inference_api_key_here
-INFERENCE_WEBHOOK_ID=your_webhook_id_here  # You'll get this after step 5
-EOF
-```
-
-### 4. Initialize Database
-
-```bash
-cd src
-python init_db.py
-```
-You should see: 
-```table 'images' created successfully```
-
-### 5. Set Up Webhook with inference.net
-
-1. Start ngrok:
-   ```bash
-   ngrok http 8000
-   ```
-
-2. Copy your ngrok URL (e.g., `https://0bf3-158-51-80-215.ngrok-free.app`)
-
-3. Go to [inference.net dashboard](https://dashboard.inference.net)
-
-4. Navigate to **https://inference.net/dashboard/webhooks**
-
-5. Click **Create Webhook** and configure:
-   - **Name**: Magnus Detection Webhook (or any descriptive name)
-   - **URL**: `<your-ngrok-url>/webhook` (e.g., `https://0bf3-158-51-80-215.ngrok-free.app/webhook`)
-   - Save the webhook
-
-6. Copy the webhook ID (e.g., `AhALzdz8S`) and update your `.env` file with it
-
-### 6. Start the API
-
-```bash
-# In the src directory
-uvicorn api:app --reload
-```
-
-### 7. Process URLs
-
-In a new terminal (with virtual environment activated):
-
-```bash
-cd src
-python run.py test_urls.json  # Processes the 3 test URLs
-# Or process the full dataset:
-python run.py ../gothamchess/urls.json
-```
-
-## How It Works
-
-1. **Submit URL**: The API creates a database entry and downloads the image
-2. **Send to inference.net**: Uses the slow API (`/v1/slow`) with structured outputs to get:
-   - `has_magnus` (boolean): Whether Magnus Carlsen is in the image
-   - `caption` (string): Description of what's in the image
-3. **Webhook Response**: Results arrive in 24-72 hours via webhook
-4. **Database Update**: The webhook handler updates the database with results
-
-## API Endpoints
-
-- `POST /submit_url` - Submit an image URL for processing
-  ```json
-  {
-    "url": "https://example.com/image.jpg"
-  }
-  ```
-
-- `POST /webhook` - Receives results from inference.net (called automatically)
-
-- `GET /` - Health check
-
-## Testing
-
-Test the API with a single URL:
-
-```bash
-python test_api.py
-```
-
-## Project Structure
-
-```
-inference-webhook/
-├── .venv/              # Virtual environment
-├── src/                # Source code
-│   ├── api.py          # Main FastAPI application
-│   ├── init_db.py      # Database initialization
-│   ├── run.py          # Batch URL processor
-│   ├── test_api.py     # API tester
-│   ├── start.sh        # Helper script
-│   └── test_urls.json  # Test URLs (3 samples)
-├── gothamchess/        # Full dataset
-│   └── urls.json       # All URLs to process
-└── requirements.txt    # Python dependencies
-```
-
-## Notes
-
-- The slow API takes 24-72 hours to process requests but is more cost-effective
-- Make sure to keep ngrok running while waiting for webhook responses
-- The database stores all results permanently for future reference 
\ No newline at end of file
+License
+MIT License
\ No newline at end of file
diff --git a/.env.example b/webhook-example/.env.example
similarity index 100%
rename from .env.example
rename to webhook-example/.env.example
diff --git a/webhook-example/README.md b/webhook-example/README.md
new file mode 100644
index 0000000..7b4a70b
--- /dev/null
+++ b/webhook-example/README.md
@@ -0,0 +1,148 @@
+# Magnus Detection API
+
+A minimalistic API that uses inference.net to detect Magnus Carlsen in images using webhooks, structured outputs, and the slow API for cost-effective processing.
+
+## Prerequisites
+
+- Python 3.9+
+- ngrok account (free tier is fine)
+- inference.net API key
+- Neon PostgreSQL database
+
+## Setup
+
+### 0. Provision a Postgres Database
+You can use Neon to do this quickly and easily. 
+
+Once you provision your db, save your connection string for later.
+
+### 1. Clone and Setup Virtual Environment
+
+```bash
+# Clone the repository
+git clone <repository-url>
+cd inference-webhook
+
+# Create virtual environment
+python -m venv .venv
+source .venv/bin/activate  # On Windows: .venv\Scripts\activate
+```
+
+### 2. Install Dependencies
+
+```bash
+pip install -r requirements.txt
+```
+
+### 3. Configure Environment Variables
+
+Create a `.env` file in the `src/` directory:
+
+```bash
+cd src
+cat > .env << EOF
+DATABASE_URL=your_database_url_here
+INFERENCE_API_KEY=your_inference_api_key_here
+INFERENCE_WEBHOOK_ID=your_webhook_id_here  # You'll get this after step 5
+EOF
+```
+
+### 4. Initialize Database
+
+```bash
+cd src
+python init_db.py
+```
+You should see: 
+```table 'images' created successfully```
+
+### 5. Set Up Webhook with inference.net
+
+1. Start ngrok:
+   ```bash
+   ngrok http 8000
+   ```
+
+2. Copy your ngrok URL (e.g., `https://0bf3-158-51-80-215.ngrok-free.app`)
+
+3. Go to [inference.net dashboard](https://dashboard.inference.net)
+
+4. Navigate to **https://inference.net/dashboard/webhooks**
+
+5. Click **Create Webhook** and configure:
+   - **Name**: Magnus Detection Webhook (or any descriptive name)
+   - **URL**: `<your-ngrok-url>/webhook` (e.g., `https://0bf3-158-51-80-215.ngrok-free.app/webhook`)
+   - Save the webhook
+
+6. Copy the webhook ID (e.g., `AhALzdz8S`) and update your `.env` file with it
+
+### 6. Start the API
+
+```bash
+# In the src directory
+uvicorn api:app --reload
+```
+
+### 7. Process URLs
+
+In a new terminal (with virtual environment activated):
+
+```bash
+cd src
+python run.py test_urls.json  # Processes the 3 test URLs
+# Or process the full dataset:
+python run.py ../gothamchess/urls.json
+```
+
+## How It Works
+
+1. **Submit URL**: The API creates a database entry and downloads the image
+2. **Send to inference.net**: Uses the slow API (`/v1/slow`) with structured outputs to get:
+   - `has_magnus` (boolean): Whether Magnus Carlsen is in the image
+   - `caption` (string): Description of what's in the image
+3. **Webhook Response**: Results arrive in 24-72 hours via webhook
+4. **Database Update**: The webhook handler updates the database with results
+
+## API Endpoints
+
+- `POST /submit_url` - Submit an image URL for processing
+  ```json
+  {
+    "url": "https://example.com/image.jpg"
+  }
+  ```
+
+- `POST /webhook` - Receives results from inference.net (called automatically)
+
+- `GET /` - Health check
+
+## Testing
+
+Test the API with a single URL:
+
+```bash
+python test_api.py
+```
+
+## Project Structure
+
+```
+inference-webhook/
+├── .venv/              # Virtual environment
+├── src/                # Source code
+│   ├── api.py          # Main FastAPI application
+│   ├── init_db.py      # Database initialization
+│   ├── run.py          # Batch URL processor
+│   ├── test_api.py     # API tester
+│   ├── start.sh        # Helper script
+│   └── test_urls.json  # Test URLs (3 samples)
+├── gothamchess/        # Full dataset
+│   └── urls.json       # All URLs to process
+└── requirements.txt    # Python dependencies
+```
+
+## Notes
+
+- The slow API takes 24-72 hours to process requests but is more cost-effective
+- Make sure to keep ngrok running while waiting for webhook responses
+- The database stores all results permanently for future reference 
\ No newline at end of file
diff --git a/requirements.txt b/webhook-example/requirements.txt
similarity index 100%
rename from requirements.txt
rename to webhook-example/requirements.txt
diff --git a/src/.gitignore b/webhook-example/src/.gitignore
similarity index 100%
rename from src/.gitignore
rename to webhook-example/src/.gitignore
diff --git a/src/README.md b/webhook-example/src/README.md
similarity index 100%
rename from src/README.md
rename to webhook-example/src/README.md
diff --git a/src/api.py b/webhook-example/src/api.py
similarity index 100%
rename from src/api.py
rename to webhook-example/src/api.py
diff --git a/src/gotham_urls/test-urls.json b/webhook-example/src/gotham_urls/test-urls.json
similarity index 100%
rename from src/gotham_urls/test-urls.json
rename to webhook-example/src/gotham_urls/test-urls.json
diff --git a/src/gotham_urls/urls.json b/webhook-example/src/gotham_urls/urls.json
similarity index 100%
rename from src/gotham_urls/urls.json
rename to webhook-example/src/gotham_urls/urls.json
diff --git a/src/init_db.py b/webhook-example/src/init_db.py
similarity index 100%
rename from src/init_db.py
rename to webhook-example/src/init_db.py
diff --git a/src/run_optimized.py b/webhook-example/src/run_optimized.py
similarity index 100%
rename from src/run_optimized.py
rename to webhook-example/src/run_optimized.py
diff --git a/src/sample_urls.json b/webhook-example/src/sample_urls.json
similarity index 100%
rename from src/sample_urls.json
rename to webhook-example/src/sample_urls.json
diff --git a/src/start.sh b/webhook-example/src/start.sh
similarity index 100%
rename from src/start.sh
rename to webhook-example/src/start.sh
