# alistaitsacle/free-llm-api-keys architecture

> Architecture diagram of the GitHub repository alistaitsacle/free-llm-api-keys, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-06-30). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/alistaitsacle/free-llm-api-keys
- Repository: https://github.com/alistaitsacle/free-llm-api-keys

## Overview

1. This repository is primarily a **published catalog plus distribution layer** for API keys, not a full backend application. The core user-facing artifact is the markdown documentation that lists available keys, supported models, limits, and usage examples.

2. The main architectural boundary is the **OpenAI-compatible API surface**. All examples and docs route users to a single base URL, `https://aiapiv2.pekpik.com/v1`, and treat issued `sk-...` tokens as standard OpenAI-style API keys. That compatibility layer is the integration point for all downstream tools.

3. The **documentation/content subsystem** is the center of the repo. `README.md` plus localized variants (`README_CN.md`, `README_ES.md`, `README_JA.md`, `README_KO.md`, `README_PT.md`) act as the canonical human-readable catalog. They contain the live key tables, model groupings, usage instructions, FAQ, and changelog.

4. The **static site subsystem** lives under `docs/`. It includes a GitHub Pages-style site with model pages, tool-specific pages, sitemap/robots files, and a verification HTML file. `docs/.nojekyll` indicates the site is meant to be deployed as plain static assets rather than built through Jekyll processing.

5. The repo also contains a **publication/maintenance script** in `scripts/publish_keys.py`. Based on the README and file naming, this is the automation boundary that updates the published inventory: adding fresh keys, removing expired ones, and rendering the markdown/HTML output that users consume.

6. The **validation layer** is lightweight and focused on the publisher. `tests/test_publish_keys.py` exists to keep the publishing logic correct, likely checking formatting, table generation, or cleanup behavior rather than exercising a live API.

7. There is a clear **examples and integration subsystem** under `examples/`. It is organized by client/runtime: cURL, Node.js, Python, plus end-user guides for Chatbox, Cursor, and LobeChat. These examples show the expected traffic pattern: client SDK → OpenAI-compatible endpoint → selected model using the shared key.

8. The **data flow** is one-way from maintained key inventory into published artifacts. The publisher produces the live tables and changelog in the README/docs, and users copy a key from there into their apps. The repo itself does not appear to host the inference servers; it publishes access information for an external service.

9. Operationally, the system depends on an **external cron/publishing process** mentioned in the README. That job publishes new keys multiple times per day and removes expired keys throughout the day. The repo captures the output of that process rather than the scheduler itself.

10. The **distribution channels** are GitHub Pages for the docs site, the GitHub repository README for direct consumption, and social/announcement channels referenced in the README (notably X/@getkeyway) for fresh key drops and uptime updates. Those channels are part of the product’s delivery model.

11. Community and governance are handled through standard repo boundaries: `.github` issue templates, pull request templates, `CONTRIBUTING.md`, `SECURITY.md`, and `CODE_OF_CONDUCT.md`. These do not affect runtime behavior, but they define how new keys, expired-key reports, and model requests enter the publication pipeline.

12. In diagram terms, the architecture is best drawn as: **external key source/cron → publisher script → markdown/static docs → users’ OpenAI-compatible clients**. The repository is the documentation and publication plane around that flow, with tests and examples supporting correctness and adoption.

Main entry points: [`scripts/publish_keys.py`](https://github.com/alistaitsacle/free-llm-api-keys/blob/main/scripts/publish_keys.py) (Publisher), [`README.md`](https://github.com/alistaitsacle/free-llm-api-keys/blob/main/README.md) (README), [`tests/test_publish_keys.py`](https://github.com/alistaitsacle/free-llm-api-keys/blob/main/tests/test_publish_keys.py) (Publisher tests), [`.github/ISSUE_TEMPLATE/report-expired-key.md`](https://github.com/alistaitsacle/free-llm-api-keys/blob/main/.github/ISSUE_TEMPLATE/report-expired-key.md) (Issue templates)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_group_content["Content & Distribution"]
  node_readme_primary["README<br/>catalog doc<br/>[README.md]"]
  node_readme_cn["README CN<br/>localized catalog<br/>[README_CN.md]"]
  node_readme_es["README ES<br/>localized catalog<br/>[README_ES.md]"]
  node_readme_ja["README JA<br/>localized catalog<br/>[README_JA.md]"]
  node_readme_ko["README KO<br/>localized catalog<br/>[README_KO.md]"]
  node_readme_pt["README PT<br/>localized catalog<br/>[README_PT.md]"]
  node_docs_site["Docs site<br/>static site<br/>[index.html]"]
  node_docs_models["Model pages<br/>model docs"]
  node_docs_tools["Tool pages<br/>integration docs"]
  node_site_meta["Site meta<br/>static assets<br/>[.nojekyll]"]
end

subgraph group_group_automation["Automation"]
  node_publisher["Publisher<br/>key rendering script<br/>[publish_keys.py]"]
  node_publish_tests["Publisher tests<br/>validation"]
end

subgraph group_group_examples["Examples & Integrations"]
  node_curl_examples["cURL examples<br/>cli examples<br/>[examples.sh]"]
  node_python_examples["Python examples<br/>sdk examples<br/>[chat.py]"]
  node_node_examples["Node examples<br/>sdk examples<br/>[chat.js]"]
  node_integration_guides["Usage guides<br/>app guides"]
end

subgraph group_group_governance["Governance"]
  node_issue_templates["Issue templates<br/>community intake"]
  node_pr_template["PR template<br/>community workflow"]
  node_community_docs["Policy docs<br/>repo policy<br/>[CONTRIBUTING.md]"]
end

node_external_key_source(("Key source<br/>external cron"))
node_external_api_surface(("API surface<br/>OpenAI-compatible endpoint"))
node_external_clients(("Client apps<br/>user runtimes"))

node_external_key_source -->|"refreshes"| node_publisher
node_publisher -->|"renders"| node_readme_primary
node_publisher -->|"publishes"| node_docs_site
node_publisher -->|"updates"| node_docs_models
node_publisher -->|"updates"| node_docs_tools
node_publisher -->|"syncs"| node_readme_cn
node_publisher -->|"syncs"| node_readme_es
node_publisher -->|"syncs"| node_readme_ja
node_publisher -->|"syncs"| node_readme_ko
node_publisher -->|"syncs"| node_readme_pt
node_publisher -->|"packages"| node_site_meta
node_publish_tests -->|"validates"| node_publisher
node_external_api_surface -->|"target"| node_curl_examples
node_external_api_surface -->|"target"| node_python_examples
node_external_api_surface -->|"target"| node_node_examples
node_external_api_surface -->|"target"| node_integration_guides
node_external_clients -->|"consume"| node_external_api_surface
node_readme_primary -->|"documents"| node_external_api_surface
node_readme_primary -->|"instructs"| node_external_clients
node_issue_templates -->|"feeds reports"| node_publisher
node_pr_template -->|"supports"| node_community_docs

click node_readme_primary "https://github.com/alistaitsacle/free-llm-api-keys/blob/main/README.md"
click node_readme_cn "https://github.com/alistaitsacle/free-llm-api-keys/blob/main/README_CN.md"
click node_readme_es "https://github.com/alistaitsacle/free-llm-api-keys/blob/main/README_ES.md"
click node_readme_ja "https://github.com/alistaitsacle/free-llm-api-keys/blob/main/README_JA.md"
click node_readme_ko "https://github.com/alistaitsacle/free-llm-api-keys/blob/main/README_KO.md"
click node_readme_pt "https://github.com/alistaitsacle/free-llm-api-keys/blob/main/README_PT.md"
click node_docs_site "https://github.com/alistaitsacle/free-llm-api-keys/blob/main/docs/index.html"
click node_docs_models "https://github.com/alistaitsacle/free-llm-api-keys/blob/main/docs/models/free-gpt-api-key.html"
click node_docs_tools "https://github.com/alistaitsacle/free-llm-api-keys/blob/main/docs/tools/free-api-key-for-chatbox.html"
click node_site_meta "https://github.com/alistaitsacle/free-llm-api-keys/blob/main/docs/.nojekyll"
click node_publisher "https://github.com/alistaitsacle/free-llm-api-keys/blob/main/scripts/publish_keys.py"
click node_publish_tests "https://github.com/alistaitsacle/free-llm-api-keys/blob/main/tests/test_publish_keys.py"
click node_curl_examples "https://github.com/alistaitsacle/free-llm-api-keys/blob/main/examples/curl/examples.sh"
click node_python_examples "https://github.com/alistaitsacle/free-llm-api-keys/blob/main/examples/python/chat.py"
click node_node_examples "https://github.com/alistaitsacle/free-llm-api-keys/blob/main/examples/nodejs/chat.js"
click node_integration_guides "https://github.com/alistaitsacle/free-llm-api-keys/blob/main/examples/guides/use-with-chatbox.md"
click node_issue_templates "https://github.com/alistaitsacle/free-llm-api-keys/blob/main/.github/ISSUE_TEMPLATE/report-expired-key.md"
click node_pr_template "https://github.com/alistaitsacle/free-llm-api-keys/blob/main/.github/PULL_REQUEST_TEMPLATE.md"
click node_community_docs "https://github.com/alistaitsacle/free-llm-api-keys/blob/main/CONTRIBUTING.md"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_readme_primary,node_readme_cn,node_readme_es,node_readme_ja,node_readme_ko,node_readme_pt,node_docs_site,node_docs_models,node_docs_tools,node_site_meta toneBlue
class node_publisher,node_publish_tests toneAmber
class node_curl_examples,node_python_examples,node_node_examples,node_integration_guides toneMint
class node_issue_templates,node_pr_template,node_community_docs toneRose
class node_external_key_source,node_external_api_surface,node_external_clients toneNeutral
```

## Components

### Content & Distribution

Canonical published catalog and static site assets

- [README](https://github.com/alistaitsacle/free-llm-api-keys/blob/main/README.md): catalog doc · Primary English catalog of keys, models, limits, and usage · `README.md`
- [README CN](https://github.com/alistaitsacle/free-llm-api-keys/blob/main/README_CN.md): localized catalog · Chinese localized catalog · `README_CN.md`
- [README ES](https://github.com/alistaitsacle/free-llm-api-keys/blob/main/README_ES.md): localized catalog · Spanish localized catalog · `README_ES.md`
- [README JA](https://github.com/alistaitsacle/free-llm-api-keys/blob/main/README_JA.md): localized catalog · Japanese localized catalog · `README_JA.md`
- [README KO](https://github.com/alistaitsacle/free-llm-api-keys/blob/main/README_KO.md): localized catalog · Korean localized catalog · `README_KO.md`
- [README PT](https://github.com/alistaitsacle/free-llm-api-keys/blob/main/README_PT.md): localized catalog · Portuguese localized catalog · `README_PT.md`
- [Docs site](https://github.com/alistaitsacle/free-llm-api-keys/blob/main/docs/index.html): static site · GitHub Pages-style published site · `docs/index.html`
- [Model pages](https://github.com/alistaitsacle/free-llm-api-keys/blob/main/docs/models/free-gpt-api-key.html): model docs · Static pages for model-specific key information · `docs/models/free-gpt-api-key.html`
- [Tool pages](https://github.com/alistaitsacle/free-llm-api-keys/blob/main/docs/tools/free-api-key-for-chatbox.html): integration docs · Static pages for Chatbox and Cursor usage · `docs/tools/free-api-key-for-chatbox.html`
- [Site meta](https://github.com/alistaitsacle/free-llm-api-keys/blob/main/docs/.nojekyll): static assets · Deployment and crawler-control files for the published site · `docs/.nojekyll`

### Automation

Publisher logic and validation

- [Publisher](https://github.com/alistaitsacle/free-llm-api-keys/blob/main/scripts/publish_keys.py): key rendering script · Automation that updates published keys and outputs · `scripts/publish_keys.py`
- [Publisher tests](https://github.com/alistaitsacle/free-llm-api-keys/blob/main/tests/test_publish_keys.py): validation · Checks publishing behavior and output correctness · `tests/test_publish_keys.py`

### Examples & Integrations

Client-specific usage examples and guides

- [cURL examples](https://github.com/alistaitsacle/free-llm-api-keys/blob/main/examples/curl/examples.sh): cli examples · Shell-based API usage examples · `examples/curl/examples.sh`
- [Python examples](https://github.com/alistaitsacle/free-llm-api-keys/blob/main/examples/python/chat.py): sdk examples · Python client usage and multi-model patterns · `examples/python/chat.py`
- [Node examples](https://github.com/alistaitsacle/free-llm-api-keys/blob/main/examples/nodejs/chat.js): sdk examples · Node.js client usage examples · `examples/nodejs/chat.js`
- [Usage guides](https://github.com/alistaitsacle/free-llm-api-keys/blob/main/examples/guides/use-with-chatbox.md): app guides · End-user setup guides for Chatbox, Cursor, and LobeChat · `examples/guides/use-with-chatbox.md`

### Governance

Repository policy and community entry points

- [Issue templates](https://github.com/alistaitsacle/free-llm-api-keys/blob/main/.github/ISSUE_TEMPLATE/report-expired-key.md): community intake · Structured reports for expired keys and model requests · `.github/ISSUE_TEMPLATE/report-expired-key.md`
- [PR template](https://github.com/alistaitsacle/free-llm-api-keys/blob/main/.github/PULL_REQUEST_TEMPLATE.md): community workflow · Contribution template for repository changes · `.github/PULL_REQUEST_TEMPLATE.md`
- [Policy docs](https://github.com/alistaitsacle/free-llm-api-keys/blob/main/CONTRIBUTING.md): repo policy · Contribution, security, conduct, and funding references · `CONTRIBUTING.md`

### Other components

- **Key source**: external cron · Upstream process that refreshes and retires API keys
- **API surface**: OpenAI-compatible endpoint · Shared base URL used by clients and docs
- **Client apps**: user runtimes · SDKs and apps that consume the published keys

## Connections

- Key source → Publisher: refreshes · Upstream process feeds new and expired keys into the publisher
- Publisher → README: renders · Publisher updates the canonical catalog in the main README
- Publisher → Docs site: publishes · Publisher produces the static site artifacts consumed by GitHub Pages
- Publisher → Model pages: updates · Model-specific pages are derived from published inventory
- Publisher → Tool pages: updates · Integration pages are kept in sync with published access details
- Publisher → README CN: syncs · Localized catalogs mirror the main inventory
- Publisher → README ES: syncs · Localized catalogs mirror the main inventory
- Publisher → README JA: syncs · Localized catalogs mirror the main inventory
- Publisher → README KO: syncs · Localized catalogs mirror the main inventory
- Publisher → README PT: syncs · Localized catalogs mirror the main inventory
- Publisher → Site meta: packages · Static-site deployment files accompany the published assets
- Publisher tests → Publisher: validates · Tests constrain formatting and output behavior of the publisher
- API surface → cURL examples: target · Examples point requests at the shared OpenAI-compatible endpoint
- API surface → Python examples: target · Python examples call the same endpoint
- API surface → Node examples: target · Node examples call the same endpoint
- API surface → Usage guides: target · App guides configure clients against the shared endpoint
- Client apps → API surface: consume · User tools use issued keys against the compatibility layer
- README → API surface: documents · Docs present the base URL and OpenAI-style usage pattern
- README → Client apps: instructs · README directs users to copy keys into client apps
- Issue templates → Publisher: feeds reports · Expired-key and model-request reports enter the maintenance flow
- PR template → Policy docs: supports · Contribution workflow is governed by repo policy docs
