# OpenRouter APIs — Perplexity: Decider Flash Latest (~perplexity/pplx-decider-flash-latest)

Guide for calling every confirmed OpenRouter API that serves `~perplexity/pplx-decider-flash-latest`.

Model page: https://openrouter.ai/~perplexity/pplx-decider-flash-latest
Create an API key: https://openrouter.ai/settings/keys

## Pricing

`~perplexity/pplx-decider-flash-latest` is a latest alias: it always points at the newest model in its family, so each request is billed at that model's current price. Model page: https://openrouter.ai/~perplexity/pplx-decider-flash-latest

## EU in-region routing

`~perplexity/pplx-decider-flash-latest` is not currently available through EU in-region routing.

Docs: https://openrouter.ai/docs/guides/features/in-region-routing

## Authentication

Send this header with every request:

- Authorization: Bearer $OPENROUTER_API_KEY

## Decisions API

Get typed choices and scores instead of free text with `~perplexity/pplx-decider-flash-latest` through OpenRouter's Decisions API.

Docs: https://openrouter.ai/docs/guides/features/decisions

### Endpoint

POST https://openrouter.ai/api/alpha/decisions

Headers:
- Content-Type: application/json

### Request fields (~perplexity/pplx-decider-flash-latest)

- model: string (required) — `"~perplexity/pplx-decider-flash-latest"`
- state: string | object | array (required) — the content to evaluate
- questions: object (required) — at least one question, keyed by question ID; each has a `type` (`noul`, `choice` or `score`), `instructions` and `criteria`; see the example and the docs for the full schema

### Response

JSON with one typed result per requested decision. See the docs for the response schema.

### Examples

#### Make a decision

```bash
IMAGE_BASE64=$(base64 < image.png | tr -d '\n')
          
          curl https://openrouter.ai/api/alpha/decisions \
            -H "Content-Type: application/json" \
            -H "Authorization: Bearer $OPENROUTER_API_KEY" \
            -d '{
              "model": "~perplexity/pplx-decider-flash-latest",
              "state": [
                "Listing: vintage red bicycle, light scratches on the frame",
                {"type": "image_url", "image_url": {"url": "data:image/png;base64,'"$IMAGE_BASE64"'"}}
              ],
              "questions": {
                "matches_listing": {
                  "type": "noul",
                  "instructions": "Does the attached media show the listed item?",
                  "criteria": {
                    "true": "The listed item is shown",
                    "false": "Something else or nothing is shown"
                  }
                },
                "category": {
                  "type": "choice",
                  "instructions": "Which category fits this listing?",
                  "criteria": {
                    "bikes": "Complete bicycles",
                    "parts": "Components and accessories",
                    "apparel": "Clothing and gear"
                  }
                },
                "condition": {
                  "type": "score",
                  "instructions": "How worn is the item?",
                  "criteria": ["Like new", "Light wear", "Heavy wear"]
                }
              }
            }'
```

## Errors

Failures return `{"error": {"code": <number>, "message": <string>}}` with the HTTP status:

- 400 — malformed request or an unsupported parameter
- 401 — missing or invalid API key
- 402 — insufficient credits
- 403 — spend limit reached, key disabled, or access blocked
- 404 — unknown model or no provider can serve the request
- 429 — rate limited; retry with backoff
- 502 — the operation failed upstream; failed generations are not billed

---

Canonical version of this document: https://openrouter.ai/~perplexity/pplx-decider-flash-latest/llms.txt
