# ChatGPT and Codex docs · Get page

Get developer and code data with ChatGPT and Codex docs · Get page from Alexandria through one Spiral API key. To read official ChatGPT or Codex guidance verbatim (e.g. hooks lifecycle events and config, subagents, AGENTS.md, plugins and skills, Sites), or one section of it, with a citable source URL. It runs in the background and returns structured JSON. Pay as you go, with no subscription.

- Provider: Alexandria
- Category: Developer
- Runs: In the background
- Returns: json
- Tool id: `alexandria` / `learn-chatgpt-com/developer-documentation/get_page`
- Page: https://spiral.ai/tools/alexandria/learn-chatgpt-com/developer-documentation/get_page

## Pricing

$0.00873 per call.

## Limits

- Longest queue wait: 1 hour
- Run deadline: 5 minutes
- Longest run, end to end: 225 minutes
- Largest inline input: 1 MB
- Largest input file: 2 GB
- Largest output: 5 GB

## Input

| Field | Kind | Allowed | Default | Description |
| --- | --- | --- | --- | --- |
| `url` | text |  | — | Alternatively a page URL: https://learn.chatgpt.com/docs/hooks, its .md twin, or a legacy https://developers.openai.com/codex/... URL (resolved through the site redirect). A #anchor selects that section. Pattern: ^https?://. |
| `slug` | text |  | — | Docs slug after /docs/, e.g. hooks, agent-configuration/subagents, whats-new/devday-2026 (a trailing .md is accepted). list_pages and search_docs return slugs. Pattern: ^/?[A-Za-z0-9][A-Za-z0-9._-]*(/[A-Za-z0-9][A-Za-z0-9._-]*)*/?$. |
| `section` | text |  | — | Return only this heading and its subsections: heading text or anchor, case-insensitive (e.g. Matcher patterns or matcher-patterns). Overrides a URL anchor. Unknown sections are not_found. |
| `max_chars` | number | 200 to 2000000 | — | Truncate content to this many characters. |

## Example

```bash
curl https://api.spiral.ai/v1/runs \
  -H "Authorization: Bearer $SPIRAL_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
    "provider": "alexandria",
    "model": "learn-chatgpt-com/developer-documentation/get_page",
    "input": {
      "slug": "<slug>"
    }
  }'
```

Try it in the Playground: https://spiral.ai/start?provider=alexandria&model=learn-chatgpt-com%2Fdeveloper-documentation%2Fget_page

## Common questions

### ChatGPT and Codex docs · Get page

**How much does ChatGPT and Codex docs · Get page cost?**

$0.00873 per call. You pay as you go from one Spiral balance, with no subscription, and a failed run is not charged.

**How do I use ChatGPT and Codex docs · Get page through an API?**

Send `POST /v1/runs` with `"provider": "alexandria"`, `"model": "learn-chatgpt-com/developer-documentation/get_page"` and the input fields on this page, using one Spiral API key. It runs in the background: poll the run, or name a webhook to be told when it finishes.

**Do I need an account with Alexandria to use ChatGPT and Codex docs · Get page?**

No. Spiral runs it on its own Alexandria account and charges your Spiral balance.

**Can my AI agent use ChatGPT and Codex docs · Get page?**

Yes. Agents find and run it through Spiral's MCP server, CLI or agent skill, with the same API key.

