{"id":22420503,"url":"https://github.com/eniompw/api-speed","last_synced_at":"2025-07-16T13:05:49.934Z","repository":{"id":258525388,"uuid":"865666145","full_name":"eniompw/api-speed","owner":"eniompw","description":"Compare API speed from Mistral, Groq, Google's Gemini, and NVIDIA","archived":false,"fork":false,"pushed_at":"2024-10-17T09:01:29.000Z","size":17,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-27T04:43:46.111Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/eniompw.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-09-30T23:09:37.000Z","updated_at":"2024-10-17T09:02:22.000Z","dependencies_parsed_at":"2024-10-20T13:03:07.949Z","dependency_job_id":null,"html_url":"https://github.com/eniompw/api-speed","commit_stats":null,"previous_names":["eniompw/api-speed"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/eniompw/api-speed","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eniompw%2Fapi-speed","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eniompw%2Fapi-speed/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eniompw%2Fapi-speed/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eniompw%2Fapi-speed/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eniompw","download_url":"https://codeload.github.com/eniompw/api-speed/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eniompw%2Fapi-speed/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265512201,"owners_count":23779886,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-05T16:19:59.313Z","updated_at":"2025-07-16T13:05:49.899Z","avatar_url":"https://github.com/eniompw.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# API Speed Test\n\nThis project tests the speed and responses of various AI APIs, including Mistral, Groq, Google's Gemini, and NVIDIA. It also stores the response times in a SQLite database for historical analysis.\n\n## Setup\n\n1. Create a file named `.env` in the project root directory with the following content:\n   ```bash\n   MISTRAL_API_KEY=your_mistral_api_key\n   GROQ_API_KEY=your_groq_api_key\n   GOOGLE_API_KEY=your_google_api_key\n   NV_API_KEY=your_nvidia_api_key\n   ```\n   Replace `your_*_api_key` with your actual API keys.\n\n2. Install the required packages:\n   ```bash\n   pip install -r requirements.txt\n   ```\n\n3. Initialize the database:\n   ```bash\n   python database.py\n   ```\n\n## Usage\n\nRun the script with:\n```bash\npython app.py\n```\n\nThe script will send a test query to Mistral, Groq, Gemini, and NVIDIA APIs concurrently and display:\n- The response times for the current query\n- A snippet of each response\n- The average response time for each API/model combination\n- The fastest and slowest response times ever recorded for each API/model combination\n\n## Database\n\nThe project uses a SQLite database (`api_speed.db`) to store historical data about API responses. This allows for tracking performance over time and analyzing trends.\n\n## Customization\n\nTo change the test query, modify the `query` variable in the `main()` function of `app.py`.\n\n## API Models\n\nThe script currently uses the following models:\n- Mistral: mistral-large-2407\n- Groq: llama-3.2-90b-text-preview\n- Gemini: gemini-1.5-pro-002\n- NVIDIA: nvidia/llama-3.1-nemotron-70b-instruct\n\nTo change the models or add more APIs, modify the `API_CONFIG` dictionary in `app.py`.\n\n## Requirements\n\nSee `requirements.txt` for the list of required Python packages.\n\n## Note\n\nEnsure you have valid API keys for all the services you want to test. If you don't have a key for a particular service, the script will handle the error gracefully and continue testing the other APIs.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feniompw%2Fapi-speed","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feniompw%2Fapi-speed","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feniompw%2Fapi-speed/lists"}