# Forums Spacebattles — 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.

> Search and read science fiction stories from the SpaceBattles Creative Library, accessing detailed story metadata, author profiles, and full chapter content all in one place. Discover new fiction across various genres with easy browsing and comprehensive information about stories and their creators.

**Category:** Entertainment | **Website:** [forums.spacebattles.com/](https://forums.spacebattles.com/) | **Docs:** [parse.bot/marketplace/b0186f12-c098-4d8b-8662-7cb459c1791b/forums-spacebattles-com-api](https://parse.bot/marketplace/b0186f12-c098-4d8b-8662-7cb459c1791b/forums-spacebattles-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/forums-spacebattles/`
**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 author

Retrieve a member/author profile including username, join date, message count, total likes received, and awards.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `member_id` | string | Yes | Numeric member ID from SpaceBattles (e.g. from get_story author_id field). |

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

### Get story

Retrieve full metadata for a fiction story including title, author info, categorized tags, story stats (status, watchers, word count), and an ordered list of chapters with titles and dates. Requires two requests: one for the thread page metadata and one for the threadmarks (chapter listing).

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `thread_id` | string | Yes | Numeric thread ID from SpaceBattles (e.g. from search_stories results). |

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

### Get story content

Retrieve the text content of a story's chapters via reader mode. Returns the full prose text of each threadmarked chapter on the requested page. Stories with many chapters may span multiple pages.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `page` | integer | No | Page number for stories with many chapters. |
| `thread_id` | string | Yes | Numeric thread ID from SpaceBattles. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/forums-spacebattles/get-story-content \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"page":"<integer>","thread_id":"<string>"}'
```

### Search stories

Browse fiction stories in the SpaceBattles Creative Library with optional filtering by tag, fandom/setting, and title keyword. Results are ordered by most recent activity. Each story summary includes title, author, tags with categories (Setting, Character, Genre, Warning, Content), word count, and engagement stats. Title filtering is applied client-side to the current page of results.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `fandom` | string | No | Fandom/setting tag to filter stories by (e.g. 'worm', 'rwby', 'pokemon'). Functions as a tag filter scoped to fandom. If both fandom and tags are provided, fandom takes precedence. |
| `page` | integer | No | Page number for pagination. |
| `tags` | string | No | Tag name to filter stories by (e.g. 'worm', 'original', 'rwby'). Matches the site's tag vocabulary. Omitting returns all stories. |
| `title` | string | No | Case-insensitive keyword to filter stories by title. Applied client-side to the current page results. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/forums-spacebattles/search-stories \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"fandom":"<string>","page":"<integer>","tags":"<string>","title":"<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.