> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stophy.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Extract

> Pull the fields you name from any public page as JSON, each checked against the page.

Best for a few facts from one page, like a price, a date or a list of names.

```bash cURL theme={null}
curl -X POST https://api.stophy.dev/v1/extract \
  -H "Authorization: Bearer $STOPHY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"urls":["https://bun.com/docs/runtime/bunfig"],"schema":{"type":"object","properties":{"file":{"type":"string"}}},"prompt":"What is the name of the configuration file this page describes?"}'
```

```json 200 theme={null}
{
  "success": true,
  "id": "d3aa5deb-d81b-4b37-8e4a-4eb06b74cab9",
  "invalidURLs": []
}
```


## OpenAPI

````yaml api-reference/openapi.json POST /v1/extract
openapi: 3.1.0
info:
  title: Stophy API
  version: '1'
  description: >-
    Each operation shows its method and its input: a JSON object body, path and
    query parameters, or a file upload.


    Responses leave out empty values: null, empty strings, empty objects and
    empty nested lists are not sent.


    Text comes back whole. To get shorter responses, add
    ?maxTextLength=<characters> to the URL. Every text value longer than that is
    cut and ends with …. A screenshot is never cut, and a page whose text was
    cut has isTruncated set to true.


    The x-cost-usd response header is what the request cost in dollars. An
    operation's description gives its pricing units and add-ons. The OpenAPI
    fields x-cost-usd and x-cost-usd-max are list-price estimates, not receipts
    or spending limits. When a call starts a job, check the job result for its
    total cost.


    When a response has a cursor, send it back unchanged with the same input to
    get the next page. When it has a page, send the next page number.
servers:
  - url: https://api.stophy.dev
security:
  - apiKey: []
paths:
  /v1/extract:
    post:
      summary: >-
        Pull the fields you name from any public page as JSON, each checked
        against the page
      description: >-
        Costs $5 per 1,000 pages for most pages: the page's own price plus $4
        per 1,000 pages. Each page after the first costs $1 per 1,000 pages
        more, and a long answer costs $1 per 1,000 pages more for every 64
        values after the first 64, for each 40000 characters of page text read.
        A call that finds none of the fields is free. The catalog estimate is
        for ordinary pages, not a spending limit for PDF reads or other add-ons.
      operationId: extract
      parameters:
        - $ref: '#/components/parameters/MaxTextLength'
        - $ref: '#/components/parameters/IdempotencyKey'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                urls:
                  default: []
                  description: >-
                    The pages to read, up to 25, such as
                    ["https://bun.com/blog/bun-v1.3"]. An address ending in /*
                    reads pages under it, found through the site's sitemap. With
                    more than one, the fields are filled from all of them
                    together. A page that cannot be read is skipped and named in
                    warning, and costs nothing. A page is read up to 50000
                    characters. With several pages each one gets a smaller
                    share, and all together are read up to 150000 characters. A
                    page that is cut is counted in warning. The call fails only
                    when no page can be read. Leave it out and send a prompt to
                    search the web instead.
                  maxItems: 25
                  type: array
                  items:
                    type: string
                    maxLength: 2048
                schema:
                  description: >-
                    The fields to fill, as a JSON Schema (draft-07 or 2020-12)
                    object with properties. Pydantic's model_json_schema() and
                    zod's toJSONSchema() output work as they are. enum, const,
                    anyOf, oneOf, nullable types, $ref with $defs, required,
                    descriptions and any key names are read. Up to 100 top-level
                    fields and 32 KB. A field the page does not state comes back
                    null.
                  type: object
                  propertyNames:
                    type: string
                  additionalProperties:
                    $ref: '#/components/schemas/extract.input.schema0'
                prompt:
                  description: >-
                    What to pull from the pages in plain words, such as the
                    version and the release date, up to 10000 characters. With
                    no urls, the web is searched for the first 400 characters of
                    it.
                  type: string
                  minLength: 1
                  maxLength: 10000
                systemPrompt:
                  description: >-
                    Standing instructions for how to fill the fields, such as
                    units or how to write dates, up to 10000 characters. They
                    add to the rules of the extract: a value is still copied
                    from the page and is null when the page does not state it.
                  type: string
                  minLength: 1
                  maxLength: 10000
                enableWebSearch:
                  default: false
                  description: >-
                    Send true to also search the web for your prompt and read
                    the best pages it finds, up to 3 more. Needs a prompt. The
                    search costs $1 per 1,000 searches. With no urls, the search
                    runs without this.
                  type: boolean
                allowExternalLinks:
                  default: false
                  description: >-
                    Send true to also read pages on other sites that the pages
                    link to, up to 5, picking the links whose address mentions
                    your prompt. Each page read costs $1 per 1,000 pages.
                  type: boolean
                agent:
                  description: >-
                    Accepted so a client that sends an agent model works. The
                    value is not used. An extract reads the pages it is given
                    and checks every value; it does not browse or click, and the
                    answer says so in warning. To navigate a site, use the agent
                    endpoint.
                  type: object
                  properties:
                    model:
                      type: string
                      minLength: 1
                      maxLength: 40
                  required:
                    - model
                  additionalProperties: false
                webhook:
                  description: >-
                    Where to be told when the extract ends: a plain address, or
                    { url } which gets one JSON POST with the id, the status,
                    the data and costUsd. headers are sent with the call,
                    metadata comes back in it, and events picks completed,
                    failed or both (both by default). The call is signed: read
                    Stophy-Signature (t=<unix seconds>,v1=<hex>), the
                    HMAC-SHA256 of "<t>.<body>" with your webhook secret from
                    webhook.secret. A call that gets no 2xx is sent again, up to
                    3 times. Every call has an eventId that stays the same when
                    the call is sent again, so you can skip one you already
                    handled.
                  anyOf:
                    - type: string
                    - type: object
                      properties:
                        url:
                          type: string
                        headers:
                          type: object
                          propertyNames:
                            type: string
                            pattern: ^[A-Za-z0-9-]{1,64}$
                          additionalProperties:
                            type: string
                            maxLength: 1000
                        metadata:
                          type: object
                          propertyNames:
                            type: string
                          additionalProperties:
                            $ref: '#/components/schemas/extract.input.schema0'
                        events:
                          minItems: 1
                          type: array
                          items:
                            type: string
                            enum:
                              - started
                              - page
                              - action
                              - completed
                              - failed
                              - cancelled
                      required:
                        - url
                      additionalProperties: false
                ignoreSitemap:
                  default: false
                  description: >-
                    For an address ending in /*: skip the site's sitemaps and
                    find pages by links.
                  type: boolean
                includeSubdomains:
                  default: true
                  description: >-
                    For an address ending in /*: also read pages on subdomains
                    of the site. Send false to stay on the exact host.
                  type: boolean
                limit:
                  description: >-
                    For an address ending in /*: read at most this many pages
                    under it. At most 25 pages are read in all.
                  type: integer
                  minimum: 1
                  maximum: 9007199254740991
                timeout:
                  default: 30000
                  description: >-
                    How long to keep reading the pages, in milliseconds, from 1
                    second to 5 minutes; 30 seconds by default. A page not read
                    by then is skipped and named in warning, and costs nothing.
                  type: integer
                  minimum: 1000
                  maximum: 300000
                showSources:
                  default: false
                  description: >-
                    Send true to get sources: for each field, the pages that
                    state its value.
                  type: boolean
                scrapeOptions:
                  description: How to read each page, the same options as scrape.
                  type: object
                  properties:
                    onlyMainContent:
                      default: true
                      description: >-
                        Keep only the page's main content, without menus,
                        headers, footers and ads.
                      type: boolean
                    onlyCleanContent:
                      description: >-
                        Send true to have a model remove what onlyMainContent
                        leaves behind in the markdown: cookie banners, ads,
                        share widgets, breadcrumbs, sign-up prompts, comment
                        prompts and related-article lists. It only removes whole
                        paragraphs and lists; it never rewrites or adds text,
                        and code blocks are always kept. Skipped with a warning
                        when the page is too long to clean or the model does not
                        answer. Not with zeroDataRetention. Summary, answers and
                        highlights are made from the cleaned markdown.
                      type: boolean
                    includeTags:
                      description: >-
                        Keep only the parts of the page that match these CSS
                        selectors, such as article or .price. When set,
                        onlyMainContent is not applied.
                      minItems: 1
                      type: array
                      items:
                        type: string
                        minLength: 1
                    excludeTags:
                      description: >-
                        Remove the parts of the page that match these CSS
                        selectors, such as .comments.
                      minItems: 1
                      type: array
                      items:
                        type: string
                        minLength: 1
                    maxAge:
                      description: >-
                        Accept a stored answer up to this many milliseconds old,
                        at most 30 days. Without it, 2 days, or less for a site
                        whose pages change often, and a copy up to twice that
                        age (at most 7 days) comes back at once as stale while a
                        fresh read runs. 0 always reads the page live.
                        metadata.cacheState says which one you got.
                      type: integer
                      minimum: 0
                      maximum: 9007199254740991
                    minAge:
                      description: >-
                        Answer only from a stored copy that is at least this
                        many milliseconds old, and never read the page live. 0
                        accepts any stored copy. A page with no such copy is
                        notFound.
                      type: integer
                      minimum: 0
                      maximum: 9007199254740991
                    headers:
                      description: >-
                        Extra request headers to send to the site, such as {
                        "x-plan": "pro" }. A read with headers is never answered
                        from or saved to a stored copy.
                      type: object
                      propertyNames:
                        type: string
                        pattern: ^[A-Za-z0-9-]{1,64}$
                      additionalProperties:
                        type: string
                        maxLength: 2000
                        pattern: ^[\t\x20-\x7e]*$
                    waitFor:
                      description: >-
                        Extra milliseconds to wait before reading, up to 60000,
                        for pages that load their content late. To wait for an
                        element, add a wait action with a selector. A read that
                        waits costs $1 per 1,000 pages, the same as any page.
                      type: integer
                      minimum: 0
                      maximum: 60000
                    mobile:
                      description: >-
                        Read the page as a phone would: a phone-sized screen and
                        the mobile version of the site. The page loads in a
                        browser.
                      type: boolean
                    skipTlsVerification:
                      description: >-
                        Send true to read a page whose certificate is expired,
                        self-signed or for another name. The read is not private
                        against someone between us and the site.
                      type: boolean
                    timeout:
                      default: 60000
                      description: >-
                        How long to keep trying, in milliseconds, from 1 second
                        to 5 minutes; 60 seconds by default. A page that needs a
                        browser needs at least 5 seconds, and pages behind a bot
                        check can need 10 to 30 seconds the first time. A read
                        that runs out of time is an error and costs nothing.
                      type: integer
                      minimum: 1000
                      maximum: 300000
                    parsers:
                      description: >-
                        Only the pdf parser exists. Send "pdf" or { "type":
                        "pdf", mode, maxPages, pages, blocks, pageMarkers } with
                        the same meaning as in parse. Without mode a PDF is read
                        as auto: from its text layer, and from the picture of
                        any page that has no text. fast reads the text layer
                        only, and ocr reads the picture of every page, up to 20
                        pages. Each page of text that comes back costs $0.50 per
                        1,000 pages from its text layer and $2.50 per 1,000
                        pages from its picture. Pictures are read only with an
                        API key.
                      minItems: 1
                      type: array
                      items:
                        anyOf:
                          - type: string
                            const: pdf
                          - type: object
                            properties:
                              type:
                                type: string
                                const: pdf
                              mode:
                                description: >-
                                  fast reads the text layer only. auto (the
                                  default) reads the text layer and reads the
                                  picture of any page that has none. ocr reads
                                  the picture of every page.
                                type: string
                                enum:
                                  - fast
                                  - auto
                                  - ocr
                              maxPages:
                                description: >-
                                  Read at most this many pages, up to 500, which
                                  is also the default.
                                type: integer
                                minimum: 1
                                maximum: 500
                              pages:
                                description: >-
                                  Send true to also get each page's markdown in
                                  pages, as { pageNumber, markdown }. No extra
                                  charge.
                                type: boolean
                              blocks:
                                description: >-
                                  Send true to also get the page's layout in
                                  blocks: each title, section header or run of
                                  text, with its page, reading order, position
                                  on the page (bbox as left, top, right, bottom
                                  from 0 to 1) and where its text sits in that
                                  page's markdown (span, as in pages). Tables,
                                  figures and formulas are not told apart. A
                                  page read from its picture is one block. No
                                  extra charge.
                                type: boolean
                              pageMarkers:
                                description: >-
                                  Send true to mark page breaks in the markdown:
                                  pages are joined with "---" and a <!-- page N
                                  --> line, where N is the page that follows. No
                                  extra charge.
                                type: boolean
                            required:
                              - type
                            additionalProperties: false
                    actions:
                      description: >-
                        Up to 50 steps to run on the page, in order, before
                        reading it: { "type": "wait", "milliseconds": 500 } (up
                        to 60 seconds), { "type": "wait", "selector": ".results"
                        }, { "type": "click", "selector": "button.more" }, {
                        "type": "write", "text": "tides" }, { "type": "press",
                        "key": "Enter" }, { "type": "scroll", "direction":
                        "down" } (also up, left or right; amount is pixels,
                        "viewport" or "max"; maxScrolls 1 to 50; selector
                        scrolls an inner container; "max" keeps scrolling until
                        the page stops growing, for feeds that load as you go),
                        { "type": "screenshot", "fullPage": true } (links come
                        back in actions.screenshots), { "type": "scrape" } (the
                        page at that point, in actions.scrapes), { "type":
                        "executeJavascript", "script": "document.title" }
                        (results in actions.javascriptReturns), { "type": "pdf",
                        "format": "A4" } (links in actions.pdfs) or { "type":
                        "perform", "action": "Click the Load more button" } (a
                        step in plain words, up to 5 browser steps on this page,
                        never leaving the site; at most 5 per call). A read with
                        actions costs $1 per 1,000 pages, the same as any page;
                        the actions themselves add nothing. If an action fails,
                        you still get the page as it stood, with a warning that
                        names the action and says why.
                      minItems: 1
                      maxItems: 50
                      type: array
                      items:
                        anyOf:
                          - type: object
                            properties:
                              type:
                                type: string
                                const: wait
                              milliseconds:
                                type: integer
                                minimum: 1
                                maximum: 60000
                            required:
                              - type
                              - milliseconds
                            additionalProperties: false
                          - type: object
                            properties:
                              type:
                                type: string
                                const: wait
                              selector:
                                type: string
                                minLength: 1
                            required:
                              - type
                              - selector
                            additionalProperties: false
                          - type: object
                            properties:
                              type:
                                type: string
                                const: click
                              selector:
                                type: string
                                minLength: 1
                              all:
                                type: boolean
                                const: false
                            required:
                              - type
                              - selector
                            additionalProperties: false
                          - type: object
                            properties:
                              type:
                                type: string
                                const: write
                              text:
                                type: string
                                minLength: 1
                            required:
                              - type
                              - text
                            additionalProperties: false
                          - type: object
                            properties:
                              type:
                                type: string
                                const: press
                              key:
                                type: string
                                minLength: 1
                                maxLength: 40
                            required:
                              - type
                              - key
                            additionalProperties: false
                          - type: object
                            properties:
                              type:
                                type: string
                                const: scroll
                              direction:
                                default: down
                                type: string
                                enum:
                                  - up
                                  - down
                                  - left
                                  - right
                              amount:
                                anyOf:
                                  - type: integer
                                    minimum: 1
                                    maximum: 100000
                                  - type: string
                                    enum:
                                      - viewport
                                      - max
                              maxScrolls:
                                type: integer
                                minimum: 1
                                maximum: 50
                              selector:
                                type: string
                                minLength: 1
                            required:
                              - type
                            additionalProperties: false
                          - type: object
                            properties:
                              type:
                                type: string
                                const: screenshot
                              fullPage:
                                type: boolean
                              quality:
                                type: integer
                                minimum: 1
                                maximum: 100
                              viewport:
                                type: object
                                properties:
                                  width:
                                    type: integer
                                    minimum: 200
                                    maximum: 3840
                                  height:
                                    type: integer
                                    minimum: 200
                                    maximum: 2160
                                required:
                                  - width
                                  - height
                                additionalProperties: false
                            required:
                              - type
                            additionalProperties: false
                          - type: object
                            properties:
                              type:
                                type: string
                                const: scrape
                            required:
                              - type
                            additionalProperties: false
                          - type: object
                            properties:
                              type:
                                type: string
                                const: executeJavascript
                              script:
                                type: string
                                minLength: 1
                                maxLength: 20000
                            required:
                              - type
                              - script
                            additionalProperties: false
                          - type: object
                            properties:
                              type:
                                type: string
                                const: pdf
                              format:
                                type: string
                                enum:
                                  - Letter
                                  - Legal
                                  - Tabloid
                                  - Ledger
                                  - A0
                                  - A1
                                  - A2
                                  - A3
                                  - A4
                                  - A5
                                  - A6
                              landscape:
                                type: boolean
                              scale:
                                type: number
                                minimum: 0.1
                                maximum: 2
                            required:
                              - type
                            additionalProperties: false
                          - type: object
                            properties:
                              type:
                                type: string
                                const: perform
                              action:
                                type: string
                                minLength: 1
                                maxLength: 500
                            required:
                              - type
                              - action
                            additionalProperties: false
                    location:
                      description: >-
                        Where to read the page from. The default is the United
                        States.
                      type: object
                      properties:
                        country:
                          description: >-
                            Two-letter country code to read the page from, such
                            as DE or JP.
                          type: string
                        languages:
                          description: >-
                            Languages to ask the site for, best first, such as
                            ["de", "en"]. Sent as Accept-Language. A read with
                            languages is never answered from or saved to a
                            stored copy.
                          minItems: 1
                          maxItems: 5
                          type: array
                          items:
                            type: string
                            pattern: ^[A-Za-z]{2,3}(?:-[A-Za-z0-9]{2,8})*$
                      additionalProperties: false
                    removeBase64Images:
                      description: >-
                        Images inside the page that carry their data in the
                        address (data:image) are dropped by default. Send false
                        to keep them in markdown and html.
                      type: boolean
                    blockAds:
                      description: >-
                        Ads and trackers are not loaded when a page runs in a
                        browser. Send false to load them.
                      type: boolean
                    fastMode:
                      description: >-
                        Send true to read the page without opening a browser:
                        the answer comes sooner, but a page that needs a
                        browser, or that refuses a plain request, comes back as
                        an error instead of being retried. Ignored when the call
                        needs a browser (actions, screenshot, waitFor, mobile,
                        profile, network, branding).
                      type: boolean
                    proxy:
                      description: >-
                        auto: basic first, enhanced once if the site refuses.
                        basic: one plain attempt. enhanced: the stronger read
                        from the start. stealth is the same as enhanced. Same
                        price.
                      type: string
                      enum:
                        - auto
                        - basic
                        - enhanced
                        - stealth
                    storeInCache:
                      default: true
                      description: >-
                        Send false to skip reading and saving stored copies. Use
                        zeroDataRetention to read live without saving a copy.
                      type: boolean
                    lockdown:
                      description: >-
                        Send true to answer only from a stored copy of the page
                        and never read it live, whatever its age. A page with no
                        stored copy is notFound. The same as minAge 0.
                      type: boolean
                    checkPromptInjection:
                      description: >-
                        Send true to scan the page text for instructions aimed
                        at an AI model before anything is built from it. A page
                        that has them is refused with 403
                        promptInjectionDetected and costs nothing. The scan adds
                        $2.50 per 1,000 pages when it runs; a page it cannot
                        scan fully comes back with a warning and no charge.
                      type: boolean
                    redactPII:
                      description: >-
                        Send true, or an object, to hide personal data in the
                        markdown and in everything made from it (summary,
                        answers, highlights, json). Links, html and rawHtml are
                        not changed. A page the model cannot scan is refused
                        rather than returned unredacted.
                      anyOf:
                        - type: boolean
                        - type: object
                          properties:
                            mode:
                              default: accurate
                              description: >-
                                accurate finds names and places with the model
                                and the rest by pattern. aggressive adds guesses
                                that catch more and may hide a little too much.
                                fast uses patterns only, so it finds no ordinary
                                names or places.
                              type: string
                              enum:
                                - accurate
                                - aggressive
                                - fast
                            entities:
                              default:
                                - PERSON
                                - EMAIL
                                - PHONE
                                - LOCATION
                                - FINANCIAL
                                - SECRET
                              description: >-
                                What to hide: PERSON, EMAIL, PHONE, LOCATION,
                                FINANCIAL, SECRET. All by default.
                              minItems: 1
                              type: array
                              items:
                                type: string
                                enum:
                                  - PERSON
                                  - EMAIL
                                  - PHONE
                                  - LOCATION
                                  - FINANCIAL
                                  - SECRET
                            replaceStyle:
                              default: tag
                              description: >-
                                tag writes <EMAIL>, mask writes * for each
                                character, remove deletes it.
                              type: string
                              enum:
                                - tag
                                - mask
                                - remove
                          additionalProperties: false
                          description: Options for redactPII.
                    profile:
                      description: >-
                        Read the page with the cookies and local storage that
                        earlier calls saved under this name, kept for your
                        account for 30 days after the last use. A call with a
                        profile always loads the page in a browser, costs $1 per
                        1,000 pages, the same as any page, and is never answered
                        from a stored copy. Only one call at a time can save to
                        a profile.
                      type: object
                      properties:
                        name:
                          type: string
                          minLength: 1
                          maxLength: 128
                          description: >-
                            A name you choose, such as shop-login. Calls with
                            the same name share state.
                        saveChanges:
                          default: true
                          description: >-
                            Keep the cookies and local storage this read leaves
                            behind for the next call with this name. Send false
                            to read with the profile without changing it.
                          type: boolean
                      required:
                        - name
                      additionalProperties: false
                    zeroDataRetention:
                      default: false
                      description: >-
                        Send true to keep nothing from this call: no stored copy
                        is read or made, and nothing from it is logged. Adds $2
                        per 1,000 scraped URLs, not per PDF page. Not with a
                        screenshot.
                      type: boolean
                  additionalProperties: false
                zeroDataRetention:
                  default: false
                  description: >-
                    Send true to keep nothing from this call: pages are read
                    live, the result is held for one hour at most, and nothing
                    is logged. Adds $2 per 1,000 pages.
                  type: boolean
                ignoreInvalidURLs:
                  default: true
                  description: >-
                    Skip addresses that are not public website URLs. Send false
                    to refuse the call instead.
                  type: boolean
              additionalProperties: false
            example:
              urls:
                - https://bun.com/docs/runtime/bunfig
              schema:
                type: object
                properties:
                  file:
                    type: string
              prompt: What is the name of the configuration file this page describes?
      responses:
        '200':
          description: The data, and what this call cost in dollars.
          headers:
            X-Request-ID:
              $ref: '#/components/headers/RequestId'
            x-credits-used:
              $ref: '#/components/headers/CreditsUsed'
            x-cost-usd:
              $ref: '#/components/headers/CostUsd'
            X-RateLimit-Limit:
              $ref: '#/components/headers/RateLimitLimit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/RateLimitRemaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/RateLimitReset'
            x-cache:
              $ref: '#/components/headers/Cache'
            x-cache-age:
              $ref: '#/components/headers/CacheAge'
            idempotent-replayed:
              $ref: '#/components/headers/IdempotentReplayed'
          content:
            application/json:
              schema:
                type: object
                additionalProperties: false
                properties:
                  success:
                    type: boolean
                    const: true
                  id:
                    type: string
                  invalidURLs:
                    type: array
                    items:
                      type: string
                required:
                  - success
                  - invalidURLs
        4XX:
          $ref: '#/components/responses/Error'
        5XX:
          $ref: '#/components/responses/Error'
components:
  parameters:
    MaxTextLength:
      name: maxTextLength
      in: query
      required: false
      description: >-
        Cut every text value in the response to this many characters. A value
        that was cut ends with …, and a page whose text was cut has isTruncated
        set to true. A screenshot is never cut. Leave it out to get the full
        text.
      schema:
        type: integer
        minimum: 1
    IdempotencyKey:
      name: Idempotency-Key
      in: header
      required: false
      description: >-
        A value you choose for one call. Send the same key with the same method,
        path and body within 24 hours and the first answer comes back with
        idempotent-replayed: true, with the same cost headers and no second
        charge. A call that sends zeroDataRetention and answers with page data
        is not kept, so a retry runs again. Needs an API key.
      schema:
        type: string
  schemas:
    extract.input.schema0:
      anyOf:
        - type: string
        - type: number
        - type: boolean
        - type: 'null'
        - type: array
          items:
            $ref: '#/components/schemas/extract.input.schema0'
        - type: object
          propertyNames:
            type: string
          additionalProperties:
            $ref: '#/components/schemas/extract.input.schema0'
    Error:
      type: object
      required:
        - success
        - error
        - code
      properties:
        success:
          const: false
        error:
          type: string
          description: What went wrong and what to do next.
        code:
          type: string
          enum:
            - apiKeyRequired
            - busy
            - checkRunning
            - cliSessionCompleted
            - cliSessionExists
            - cliSessionNotFound
            - forbidden
            - freeLimit
            - insufficientCredits
            - internalError
            - inviteClaimed
            - inviteDisabled
            - inviteExpired
            - inviteUsedUp
            - invalidCliSession
            - invalidCliVerifier
            - invalidRequest
            - jobFinished
            - methodNotAllowed
            - notFound
            - payloadTooLarge
            - profileBusy
            - profileTooLarge
            - prohibitedPermission
            - promptInjectionDetected
            - rateLimited
            - sourceChanged
            - sourceRefused
            - siteNotRead
            - sourceTimeout
            - sourceUnavailable
            - unauthorized
            - unsupportedMediaType
        retryable:
          type: boolean
          description: true when trying again can help.
        retryAfterSeconds:
          type: integer
        requestId:
          type: string
        requiredCredits:
          type: number
          description: >-
            Older field: the most the call can cost, in $0.002 steps. Sent when
            the balance is too low.
        availableCredits:
          type: number
          description: 'Older field: the balance in $0.002 steps. Sent with requiredCredits.'
        requiredUsd:
          type: number
          description: >-
            The most the call can cost, in dollars. Sent when the balance is too
            low.
        availableUsd:
          type: number
          description: What is left on the account, in dollars. Sent with requiredUsd.
        billingUrl:
          type: string
          description: Where to add money. Sent with requiredUsd.
        signupUrl:
          type: string
          const: https://stophy.dev/signup
          description: >-
            Where a person gets a key. Sent with apiKeyRequired, freeLimit and
            an invalid key.
        signup:
          type: string
          const: POST https://api.stophy.dev/v1/signup
          description: >-
            The call that gets an agent a key with no human. Sent next to
            signupUrl.
  headers:
    RequestId:
      description: The request id. Quote it when you report a problem.
      schema:
        type: string
    CreditsUsed:
      description: >-
        Older header: what this call cost, as whole steps of $0.002. Use
        x-cost-usd.
      schema:
        type: integer
    CostUsd:
      description: What this call cost, in dollars.
      schema:
        type: string
    RateLimitLimit:
      description: Requests allowed in the current window.
      schema:
        type: integer
    RateLimitRemaining:
      description: Requests left in the current window.
      schema:
        type: integer
    RateLimitReset:
      description: Unix time in seconds when the current window resets.
      schema:
        type: integer
    Cache:
      description: hit if this result came from the cache, miss if it was fetched live.
      schema:
        type: string
    CacheAge:
      description: Seconds since the returned result was written to the cache.
      schema:
        type: integer
    IdempotentReplayed:
      description: >-
        true when this call reuses the result of an earlier call with the same
        Idempotency-Key.
      schema:
        type: string
    RetryAfter:
      description: Seconds to wait before retrying.
      schema:
        type: integer
  responses:
    Error:
      description: The request failed. Retry-After says when trying again can help.
      headers:
        X-Request-ID:
          $ref: '#/components/headers/RequestId'
        Retry-After:
          $ref: '#/components/headers/RetryAfter'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.