{"id":25856414,"url":"https://github.com/schbenedikt/nextcloud-ai","last_synced_at":"2026-04-19T05:37:22.477Z","repository":{"id":279991139,"uuid":"940434198","full_name":"SchBenedikt/nextcloud-ai","owner":"SchBenedikt","description":"Nextcloud AI with Cloudflare Workers","archived":false,"fork":false,"pushed_at":"2025-04-10T11:50:32.000Z","size":134,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-04-10T12:57:10.128Z","etag":null,"topics":["ai","free","nextcloud","worker"],"latest_commit_sha":null,"homepage":"https://technik.schächner.de/blog/2025/03/01/nextcloud-assistant-kostenlos-einrichten/","language":"Python","has_issues":false,"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/SchBenedikt.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,"zenodo":null}},"created_at":"2025-02-28T07:00:26.000Z","updated_at":"2025-04-10T11:50:36.000Z","dependencies_parsed_at":null,"dependency_job_id":"718fba79-756e-422e-9e2f-4309848fa55c","html_url":"https://github.com/SchBenedikt/nextcloud-ai","commit_stats":null,"previous_names":["schbenedikt/nextcloud-ai"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/SchBenedikt/nextcloud-ai","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SchBenedikt%2Fnextcloud-ai","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SchBenedikt%2Fnextcloud-ai/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SchBenedikt%2Fnextcloud-ai/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SchBenedikt%2Fnextcloud-ai/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SchBenedikt","download_url":"https://codeload.github.com/SchBenedikt/nextcloud-ai/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SchBenedikt%2Fnextcloud-ai/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266135014,"owners_count":23881774,"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":["ai","free","nextcloud","worker"],"created_at":"2025-03-01T18:17:59.300Z","updated_at":"2026-04-19T05:37:22.434Z","avatar_url":"https://github.com/SchBenedikt.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Cloudflare AI Workers 🔗 Nextcloud Assistant\n\nI made this script mainly targeted for nextcloud assistant because cloudflare provides Ai endpoints as openai API format for a good number of requests (almost for free) so why not use it instead of hosting our own instance of AI.\n\n## Issue with directly using the cloudflare provided OpenAI API\n\nWhen you try to use the Cloudflare provided OpenAI API directly, you might encounter an issue. For example, if you make the following request:\n\n```bash\ncurl  https://api.cloudflare.com/client/v4/accounts/{accountid}/ai/v1/models \\\n  -H  \"Authorization: Bearer XXXXXXXXXXXXXXXXXXXXXXXXXXX\"\n```\n\nYou might get a response like this:\n\n```json\n{\"result\":null,\"success\":false,\"errors\":[{\"code\":7001,\"message\":\"GET not supported for requested URI.\"}],\"messages\":[]}\n```\n\nThis is because Cloudflare doesn't provide `/v1/models` in their API. To solve this, I created this script which returns the list of models from the list specified in `main.py` and forwards the rest of the requests directly to the Cloudflare API.\n\n## How to use\n\n### 1. Install Nextcloud Assistant and OpenAI Integration\n\nMake sure you have installed Nextcloud Assistant and OpenAI integration in your Nextcloud instance.\n\n### 2. Get Account ID and API Key from Cloudflare\n\nObtain your account ID and API key from Cloudflare. You can find more information [here](https://developers.cloudflare.com/workers-ai/get-started/rest-api/#1-get-api-token-and-account-id).\n\n### 3. Run the Docker Container\n\nRun the following command to start the Docker container:\n\n```bash\ndocker run -d -e ACCOUNTID=XXXXXXXXXXXX -p 5050:5050 ghcr.io/schBenedikt/nextcloud-assistant:main\n```\n\nReplace `XXXXXXXXXXXX` with the account ID obtained from Cloudflare.\n\n### 4. Configure Nextcloud\n\n- Go to administration settings -\u003e Artificial intelligence\n- Under OpenAI and LocalAI integration, change the following settings:\n  - **Service URL**: `http://\u003cmachine-ip\u003e:5050`\n    - Replace `\u003cmachine-ip\u003e` with the local IP address of the machine where the Docker container is running.\n  - **API Key**: Paste the API key obtained from Cloudflare.\n\n![Nextcloud AI Configuration](image.png)\n\nCongratulations! Now you have AI integrated into your Nextcloud instance.\n\n### Note\n\nBeta models in Cloudflare AI don't count towards your request quota, but Cloudflare can move them to stable, so be careful. You can find all the models [here](https://developers.cloudflare.com/workers-ai/models/#text-generation).\n\n### Contributions are welcome!\n\nContributions are most welcome, such as improving the documentation, adding new models to the list, etc.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fschbenedikt%2Fnextcloud-ai","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fschbenedikt%2Fnextcloud-ai","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fschbenedikt%2Fnextcloud-ai/lists"}