{"id":28165309,"url":"https://github.com/eniompw/chutes-api","last_synced_at":"2025-09-11T21:37:05.655Z","repository":{"id":285363049,"uuid":"957864956","full_name":"eniompw/Chutes-API","owner":"eniompw","description":"Simple Example of the Chutes API","archived":false,"fork":false,"pushed_at":"2025-04-01T00:02:32.000Z","size":6,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-15T12:11:40.216Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","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":"LICENSE","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":"2025-03-31T09:07:13.000Z","updated_at":"2025-04-01T00:02:35.000Z","dependencies_parsed_at":"2025-03-31T10:34:29.767Z","dependency_job_id":null,"html_url":"https://github.com/eniompw/Chutes-API","commit_stats":null,"previous_names":["eniompw/chutes-api"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/eniompw/Chutes-API","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eniompw%2FChutes-API","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eniompw%2FChutes-API/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eniompw%2FChutes-API/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eniompw%2FChutes-API/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eniompw","download_url":"https://codeload.github.com/eniompw/Chutes-API/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eniompw%2FChutes-API/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266561286,"owners_count":23948624,"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","status":"online","status_checked_at":"2025-07-22T02:00:09.085Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":"2025-05-15T12:11:20.967Z","updated_at":"2025-07-22T19:33:28.269Z","avatar_url":"https://github.com/eniompw.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Chutes-API\n\nA simple Python client example for interacting with the [Chutes AI](https://chutes.ai) API.\n\n## Description\n\nThis project demonstrates how to make API requests to the Chutes AI service to generate text completions using large language models (LLMs) like DeepSeek V3. Use this as a starting point for integrating Chutes AI capabilities into your Python applications.\n\n## Prerequisites\n\n- Python 3.6+\n- `requests` library\n- A Chutes AI API token\n\n## Installation\n\n1. Clone this repository:\n   ```bash\n   git clone https://github.com/yourusername/Chutes-API.git\n   cd Chutes-API\n   ```\n\n2. Install the required dependencies:\n   ```bash\n   pip install requests\n   ```\n\n3. Set up your API token as an environment variable:\n   ```bash\n   export CHUTES_API_TOKEN=cpk_...\n   ```\n\n## Usage\n\nThe example script `rest.py` demonstrates how to make a basic API request:\n\n```python\nimport requests\nimport os\n\nAPI_TOKEN = os.getenv(\"CHUTES_API_TOKEN\")\nAPI_URL = \"https://llm.chutes.ai/v1/chat/completions\"\n\n# Make sure your API token is set\nif not API_TOKEN:\n    print(\"Error: CHUTES_API_TOKEN environment variable not set.\")\nelse:\n    # Sample request payload\n    payload = {\n        \"model\": \"deepseek-ai/DeepSeek-V3-Base\",\n        \"messages\": [{\"role\": \"user\", \"content\": \"What is the capital of France?\"}],\n        \"max_tokens\": 32\n    }\n    headers = {\"Authorization\": f\"Bearer {API_TOKEN}\"}\n\n    try:\n        response = requests.post(API_URL, headers=headers, json=payload, timeout=15)\n        response.raise_for_status()\n        print(response.json()[\"choices\"][0][\"message\"][\"content\"])\n    except Exception as e:\n        print(f\"An error occurred: {e}\")\n```\n\n### Run the example:\n\n```bash\npython rest.py\n```\n\n## Customization\n\nYou can customize your API requests by modifying the payload:\n\n- Change the `model` to use different AI models available through Chutes AI\n- Update the `messages` array with different prompts\n- Adjust parameters like `max_tokens`, `temperature`, etc.\n\n## API Resources\n\n- [Chutes AI Dashboard](https://chutes.ai/app)\n- [API Documentation](https://chutes.ai/docs) (if available)\n\n## License\n\nThis project is licensed under the terms included in the [LICENSE](LICENSE) file.\n\n## Support\n\nFor issues with the API itself, contact Chutes AI support.\nFor issues with this example code, please open an issue in the repository.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feniompw%2Fchutes-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feniompw%2Fchutes-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feniompw%2Fchutes-api/lists"}