•   7 months ago

cant's install apis, documentation confusing

hello everyone. im almost done with my project and as the last step i wanted to switch from using mock data to the actual apis. but i can't get get them to work no matter what. im a beginner developer and every time i ask someone new about this, i realise that there are more and more prerequisites i don't have, and it seems like the documentation available is just not made for people starting from complete zero like me. is it possible to maybe call someone to install this together? bc im really close to finishing my project and this technical challenge is really stressing me out.

  • 12 comments

  • Manager   •   7 months ago

    You may want to go to chrome://flags, change "Enables optimization guide on device" to "Enabled BypassPerfRequirement", and restart Chrome to see if it makes the APIs testable for you on your machine.

  •   •   7 months ago

    @beaufortfrancois okay and then how do i check if the api is testable?

  •   •   7 months ago

    how about proofreader, writer and rewriter? bc i followed this documentation but it doesn't work. i tried on chrome, chrome dev, chrome beta and chrome canary. i asked chatgpt to give me a test extension. i asked around in the developers discord. but nothing seems to work, i really don't know what to do.

  •   •   7 months ago

    Hello! i used the steps below for my extension - you can try -
    1 - download and install Chrome Canary
    2 - go to
    a) chrome://flags/- enable all the api's you want to use: Rewriter API/ Proofreader API etc - or enable all features in flags!
    b)chrome://components/ - Find and click "Check for update" on the **Origin Trials** component and, crucially, the **Optimization Guide On Device Model** component to ensure you have the latest framework and the Gemini Nano model is available for download.

    3 - Install your extension :chrome://extensions/ - load extension - on installing you will get a unique id for your extension eg: ID: cjkholchggdfsdfsdfsdvfdvdvfd
    4 - Copy your ID and go to : https://developer.chrome.com/origintrials/#/trials/active - login - and goto Active Trails tab - Select the API you want to use and click Register - in the trail registration page:
    a) Web Origin : chrome-extension://your-extension-id
    b) Select as per your requirement:
    Third-party matching. The token will be injected by script on other origins.
    I need a token to match all subdomains of the origin.
    c) Expected Usage - your wish!!
    d) Complete the registration to get your trial token. Do not use this token in a tag. Instead, for a Chrome Extension, you must add the token and a corresponding permission to your extension's manifest.json file.

    5) If you go to chrome://on-device-internals/ - Model Status - you will get all the report for the api's that is available.

    6) For websites/webapp :register the URL of your site instead of an extension ID.
    goto : https://developer.chrome.com/origintrials/#/trials/active - search your API
    Register:
    Web Origin: Enter the secure, publicly available URL of your website (e.g., https://www.yoursite.com).
    Origin Trials require HTTPS. They will not work on plain HTTP.
    If you are testing locally, you can register for http://localhost:port or http://127.0.0.1:port.
    Third-party matching: Usually not required for a simple web app unless you are embedding it as a script on other people's domains.
    Match subdomains: Select this if you want the same token to work on beta.yoursite.com and www.yoursite.com.- Get Token: Complete the registration and copy the generated token string and use the token as you wish!
    The current general requirements for running the on-device model are: Storage: 22 GB free space. GPU: 4 GB VRAM (if available), OR CPU/RAM:4 CPU cores and 16 GB RAM. Performance on systems below these specs may be unstable.
    I hope this will help- and good luck on your project.

  •   •   7 months ago

    @tangit thank you so much!
    on chrome://on-device-internals/ i have the following:
    Foundational model state: Ready
    Model Name: v3Nano
    Version: 2025.08.14.1358
    Backend Type: CPU
    File path: C:\Users\[my user name]\AppData\Local\Google\Chrome SxS\User Data\OptGuideOnDeviceModel\2025.8.21.1028
    Folder size: 4,073.83 MiB

    and then in the table below

    Property Value
    device capable true
    disk space available true
    enabled by enterprise policy true
    enabled by feature true
    is already installing true
    on device feature recently used true
    out of retention false
    Detected VRAM (MiB) Not Available
    Minimum VRAM required (MiB) 3000

    is that what im supposed to see? does this mean the model was downloaded?

  •   •   7 months ago

    is there maybe like a website i can go to or a command i can run in the browser console to check that the model has been downloaded correctly?

  •   •   7 months ago

    no problem! try this: await LanguageModel.availability(); in your canary console- in available - than The model is present & The API is functional

  •   •   7 months ago

    if your chrome://on-device-internals/ has the above result than this is the main confirmation. It means the model is fully downloaded, installed, and ready to be loaded by the AI APIs.!

  •   •   7 months ago

    @tangit it's returning
    await LanguageModel.availability();
    No output language was specified in a LanguageModel API request. An output language should be specified to ensure optimal output quality and properly attest to output safety. Please specify a supported output language code: [en, es, ja]
    'downloadable'

    so i suppose it wasn't downloaded..?

  •   •   7 months ago

    m having the same problem! - m ignoring the error for now! -- but need to update that , you are right should be specified for optimal output quality and output safety.

  •   •   7 months ago

    sorry im still stuck...

    now i have
    await LanguageModel.availability();
    'available'

    but how do i get it to work with proofreader? im trying to follow the steps here https://developer.chrome.com/docs/ai/proofreader-api

    but im getting
    const proofreader = await Proofreader.create({
    expectedInputLanguages: ["en"],
    monitor(m) {
    m.addEventListener("downloadprogress", e => {
    console.log(`Downloaded ${e.loaded * 100}%`);
    });
    }
    });

    VM82:5 Downloaded 0%

    it's just stuck at 0%

Comments are closed.