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

# Run the API Locally

> Test the gemini-web2api on your machine before deploying.

# Run the API Locally

You can run gemini-web2api locally to test it before deploying to a serverless platform.

## Prerequisites

* Python 3.8+
* `httpx` library (for streaming)

## Steps

<Steps>
  <Step title="Install dependencies">
    ```bash theme={null}
    git clone https://github.com/adrianpriza-ai/free-gemini
    ```
  </Step>

  <Step title="Install dependencies">
    ```bash theme={null}
    pip install httpx
    ```
  </Step>

  <Step title="Start the server">
    ```bash theme={null}
    python gemini_web2api.py
    ```

    The server starts at `http://localhost:8081/v1`.
  </Step>

  <Step title="Verify">
    Test with cURL:

    ```bash theme={null}
    curl http://localhost:8081/v1/chat/completions \
      -H "Content-Type: application/json" \
      -H "Authorization: Bearer now-and-then" \
      -d '{"model":"gemini-3.5-flash","messages":[{"role":"user","content":"Hello!"}]}'
    ```
  </Step>
</Steps>

## Next Steps

Once you've verified it works locally, choose a deployment platform to run it in production.
