# Theodinproject — Wrapped API

> **You are on:** `https://api.paywithlocus.com/api` | [llms.txt](https://paywithlocus.com/llms.txt) | [docs](https://docs.paywithlocus.com)
>
> Locus runs on multiple environments -- make sure every URL you call matches your expected environment.
> | Environment | Landing | API | Docs |
> |---|---|---|---|
> | Production | paywithlocus.com | api.paywithlocus.com | docs.paywithlocus.com |
> | Beta | beta.paywithlocus.com | api.beta.paywithlocus.com | docs.paywithlocus.com |
> | Stage | stage.paywithlocus.com | api.stage.paywithlocus.com | docs.paywithlocus.com |
>
> If the API URL above doesn't match your expected environment, re-fetch this file from the correct domain.

> Access The Odin Project's complete curriculum structure including paths, courses, lessons, resources, and projects, plus search lessons and view detailed changelogs. Browse course outlines, find specific lessons and their learning materials all in one place.

**Category:** Education | **Website:** [theodinproject.com/](https://theodinproject.com/) | **Docs:** [parse.bot/marketplace/590b4676-be13-40b6-8484-c9e4f9ec2508/theodinproject-com-api](https://parse.bot/marketplace/590b4676-be13-40b6-8484-c9e4f9ec2508/theodinproject-com-api)

Pay-per-use API proxy for Locus Pro. Each call burns credits from your workspace balance.

## Access

**Base URL:** `https://api.paywithlocus.com/api/wrapped/credits/theodinproject/`
**Auth:** `Authorization: Bearer <LOCUS_CREDITS_SECRET_KEY>` (an `lcr_` secret key or a scoped `lcac_` agent credential)
**Required header:** `Idempotency-Key: <fresh UUID per call>`. A retry with the same key replays the stored result without a new charge.
**Response:** the provider response after any endpoint-specific normalization. `X-Locus-Credits-Charged` carries the charge and `X-Locus-Credits-Balance` the remaining balance. Insufficient credits return `402` before the provider is called.
**Pricing:** estimated costs below are USD. Locus debits the credit equivalent at your workspace rate.

Full call contract: https://docs.paywithlocus.com/api-reference/introduction

> Using a Pay With Locus wallet key (`claw_` prefix)? Wallet routes are documented separately: https://docs.paywithlocus.com/wrapped-apis/for-agents

## Endpoints

### Get all lessons for course

Returns all lessons and projects for a given course in order, with their section assignments. Flattens the course structure into a single ordered list.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `course_slug` | string | Yes | Course slug (e.g. 'foundations'). |
| `path_slug` | string | Yes | Path slug. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/theodinproject/get-all-lessons-for-course \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"course_slug":"<string>","path_slug":"<string>"}'
```

### Get all paths

Returns all learning paths available on The Odin Project. Each path contains metadata including title, slug, description, course count, and URL. Use this as the entry point to discover available curricula.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/theodinproject/get-all-paths \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### Get course

Returns full details for a specific course within a path, including its title, description, and sections. Each section contains an ordered list of lessons and projects.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `course_slug` | string | Yes | Course slug (e.g. 'foundations', 'ruby', 'javascript'). |
| `path_slug` | string | Yes | Path slug. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/theodinproject/get-course \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"course_slug":"<string>","path_slug":"<string>"}'
```

### Get lesson

Returns the full content of a single lesson or project by its slug, including HTML content sections, assignment links, knowledge check questions, and GitHub edit URL.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `slug` | string | Yes | Lesson slug (e.g. 'foundations-how-this-course-will-work', 'introduction-to-html-and-css'). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/theodinproject/get-lesson \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"slug":"<string>"}'
```

### Get lesson changelog

Returns the revision/changelog history URL for a specific lesson, derived from the GitHub edit link on the lesson page. Points to the GitHub commits page for the lesson source file.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `slug` | string | Yes | Lesson slug (e.g. 'introduction-to-html-and-css'). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/theodinproject/get-lesson-changelog \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"slug":"<string>"}'
```

### Get lesson resources

Extracts and returns all external links/resources referenced within a specific lesson, grouped by assignment links and all links with their source section.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `slug` | string | Yes | Lesson slug (e.g. 'introduction-to-html-and-css'). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/theodinproject/get-lesson-resources \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"slug":"<string>"}'
```

### Get path

Returns details for a single learning path by its slug, including its title and list of courses with lesson and project counts.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `slug` | string | Yes | Path slug identifying the learning path. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/theodinproject/get-path \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"slug":"<string>"}'
```

### Get path curriculum outline

Returns a complete hierarchical curriculum outline for a given path, including all courses with their sections and lessons. Aggregated view requiring multiple page fetches.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `slug` | string | Yes | Path slug. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/theodinproject/get-path-curriculum-outline \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"slug":"<string>"}'
```

### Get projects

Returns all project-type lessons. When path_slug and course_slug are both provided, filters to that course only. Without filters, returns projects across all paths (slower).

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `course_slug` | string | No | Course slug to filter by (e.g. 'foundations'). Must be provided together with path_slug for filtering. |
| `path_slug` | string | No | Path slug to filter by. Must be provided together with course_slug for filtering. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/theodinproject/get-projects \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"course_slug":"<string>","path_slug":"<string>"}'
```

### Search lessons

Searches lesson titles within the Foundations path. Returns matching lessons with their path and course context. Search is case-insensitive and matches against lesson titles only. Limited to Foundations path to avoid excessive requests.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `query` | string | Yes | Search keyword to match against lesson titles (case-insensitive). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/theodinproject/search-lessons \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"query":"<string>"}'
```

## Next steps

- [All wrapped API providers](https://paywithlocus.com/wapi/index.md): pick another provider.
- [Find and call tools](https://paywithlocus.com/agent/tools.md): price ceilings, async results, and errors.
- [Credits and billing](https://paywithlocus.com/agent/billing.md): what a call costs and how to add credits.
- [Agent docs index](https://paywithlocus.com/agent/index.md): every Locus agent page.