# Pokedexter Battle State

> Pokedexter Battle State is a paid API for AI agents from x402.dexter.cash, paid per call via x402, $0.01/call, status unknown (last checked 2026-09-15).

Retrieves the current full battle state for an active Pokedexter wagered Pokémon battle, including both sides' Pokémon, field conditions, and available actions.

## Facts

- Endpoint: GET https://x402.dexter.cash/api/pokedexter/battles/:battleId/state
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/pokedexter-battle-state-733b10b9
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_-AggVCMhBeAD3S_7hsGB2

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability pokedexter-battle-state-733b10b9
```

Example prompt: What's the current state of my Pokedexter battle with ID abc123 — show me both Pokémon, the field, and what moves I can make.

## When to prefer this

Use this endpoint when you need a real-time snapshot of an in-progress Pokedexter battle on the Dexter platform, specifically to see current HP, field state, and available moves before deciding on a next action. Prefer this over creating a new battle (which is a separate endpoint) or checking your active wager (which returns wager metadata, not full battle state).

## Known failure modes

- Invalid or nonexistent battleId returns an error or ok:false
- Battle has already ended and state is no longer active
- x402 payment of $0.01 USDC not provided or rejected, resulting in 402 Payment Required
- Network timeout or service unavailability

## How this service works

Get current Pokedexter battle state

## Output

Returns a JSON object with ok (boolean), battleId (string), status (string describing if the battle is ongoing/finished), and state (object containing full battle snapshot including your Pokémon, opponent's Pokémon, field conditions, and available actions you can take).

## Example request

```json
{
 "battleId": "test_battle_001"
}
```

## Response schema (JSON Schema)

```json
{
 "ok": {
  "type": "boolean"
 },
 "state": {
  "type": "object",
  "description": "Full battle state with your Pokemon, opponent Pokemon, field, and available actions."
 },
 "status": {
  "type": "string",
  "description": "Battle status."
 },
 "battleId": {
  "type": "string",
  "description": "Battle room ID."
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/pokedexter-battle-state-733b10b9/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402.dexter.cash](https://www.zero.xyz/host/x402.dexter.cash/llms.txt)
