Skip to content
Docs
    Menu

    Use your own AI

    Tools: preview, references and feedback

    Reference for the tools that screenshot your site, capture other websites, and report problems to Starjay.

    These tools let your AI see its work and other websites, and report problems with Starjay.

    get_preview

    Takes a screenshot of the site as it is right now in the editor, including unpublished changes. If the page fails to render, it returns the error instead.

    When to use it: After visible changes, to check the result. Use devices to check several screen sizes in one call.

    Needs an open turn: No.

    Input Type Required Meaning
    pagePath string No The page's address, such as /about or /blog/my-post. Default /.
    device string: desktop, tablet or mobile No Screen size: 1280×800, 834×1112 or 390×844. Default desktop.
    devices array of device names No Several screen sizes in one call; one image each. Overrides device and viewport.
    viewport object No Exact width (320–3840) and height (320–2160) in pixels.
    fullPage boolean No Capture the whole page, not just the first screen. Default false.
    selector string No Capture only one element, such as [data-component="Hero"].
    scrollTo string No Scroll an element or #anchor into view before capturing.
    click string No Click an element first, such as a menu button.
    hover string No Hover over an element first.
    focus string No Focus an element first, such as a form field.
    waitForSelector string No Wait for an element to appear before capturing.
    waitMs number No Extra wait before capturing, 0–5000 ms.
    format string: png or jpeg No Image format. Default png. Use jpeg for full-page captures.
    quality number No JPEG quality, 1–100. Default 80.

    Example call

    {
      "siteId": "0APMiuxGY2yB4xJm5BilJ",
      "pagePath": "/",
      "devices": [
        "desktop",
        "mobile"
      ],
      "selector": "[data-component=\"Hero\"]"
    }

    Example result

    One screenshot per device, plus a short JSON summary.

    Errors

    You see What it means What to do
    preview_capture_failed The preview couldn't be captured. The site may still be starting, the page may have an error, or the selector matched nothing. Read the message. Fix any page error, or retry without selector.
    rate_limited Too many screenshots in a short time. Wait the number of seconds the message gives, then retry.

    fetch_reference

    Loads another public website in a browser and returns screenshots, a summary of its colors, fonts and layout, and/or its HTML.

    When to use it: When the user points to a site they want to borrow from or rebuild. Map what you find to the site's own colors and fonts; never copy raw values.

    Needs an open turn: No.

    Input Type Required Meaning
    url string Yes The public web address to load.
    include array: screenshot, css, html Yes What to return. css is a summary of colors, typography and layout; html is the page after scripts run, cut to 50 KB.
    viewport object No preset (desktop, tablet or mobile) or exact width and height. Default 1280×800.
    capture object No mode: viewport, fullPage, selector or clip, with position (top, middle, bottom), selector or clip as needed.
    wait object No until, selector, timeoutMs and additionalMs for slow or lazy-loading pages.
    views array No 1–6 named screenshots in one call, each with its own viewport, capture, wait and simple actions (click, hover, focus, scroll into view, wait). Needs screenshot in include.

    Example call

    {
      "siteId": "0APMiuxGY2yB4xJm5BilJ",
      "url": "https://example.com",
      "include": [
        "screenshot",
        "css"
      ],
      "viewport": {
        "preset": "desktop"
      }
    }

    Example result

    A screenshot, plus JSON with url, title, a text version of the page, and the css summary.

    This uses credits. See Credits when using your own AI and Rebuild or borrow from an existing site.

    Errors

    You see What it means What to do
    invalid_url No address was given, or it isn't a public http or https address. Pass a public web address.
    include_required include is missing or empty. Say which of screenshot, css and html you want.
    screenshot_required views was used without screenshot in include. Add screenshot.
    conflicting_render_controls Both views and top-level viewport, capture or wait were sent. Use one or the other.
    fetch_failed The site couldn't be loaded. Check the address, or try a simpler capture.
    insufficient_credits Not enough credits. Ask the user to add credits.

    send_feedback

    Sends a problem report or suggestion about Starjay to the Starjay team. It doesn't go to the user, and nobody replies through it.

    When to use it: When a tool gave a wrong or confusing result, the preview is broken in a way your AI didn't cause, or something about Starjay blocked the user's request. Not for your AI's own mistakes.

    Needs an open turn: No.

    Input Type Required Meaning
    feedback string Yes A clear Markdown explanation: what you tried, what you expected, what happened. Include the tool name and error text.
    kind string: problem or suggestion No What kind of feedback it is.

    Example call

    {
      "siteId": "0APMiuxGY2yB4xJm5BilJ",
      "kind": "problem",
      "feedback": "get_preview on /menu returns a blank image on mobile, though the page renders on desktop."
    }

    Example result

    {
      "success": true,
      "message": "Thanks — your feedback was sent to the Starjay team."
    }

    Errors

    You see What it means What to do
    "feedback is required …" feedback was empty. Write the report.
    "feedback is too long …" The report is too long. Summarize it and send again.
    "feedback rate limit reached …" Too many reports in a short time. Try again shortly.