#!/bin/sh # Free model collector script for Dynagate # Depends upon curl, awk and jq # Created by Luxferre in 2026, released into the public domain REQ='curl -fsSL' CONFIG='models.csv' TCONFIG="$(mktemp)" # Write OpenCode Zen free models printf 'big-pickle,-,https://opencode.ai/zen,\n' >> "$TCONFIG" $REQ https://opencode.ai/zen/v1/models | jq -r '.data | map(select(.id | test("-free")) | .id) | .[]' | awk '{printf("%s,-,https://opencode.ai/zen/v1,\n",$0)}' >> "$TCONFIG" # Write Kilo free models $REQ https://api.kilo.ai/api/openrouter/models | jq -r '.data | map(select(.isFree) | .id) | .[]' | awk '{printf("%s,-,https://api.kilo.ai/api/openrouter,\n",$0)}' >> "$TCONFIG" # Write OVHCloud free trial models (2 req per minute per IP keyless), commented out by default # $REQ https://oai.endpoints.kepler.ai.cloud.ovh.net/v1/models | jq -r '.data | .[] | .id' | grep -viE 'diffusion|whisper|ppl|guard|embedding|bge-|-tts-' | awk '{printf("%s,-,https://oai.endpoints.kepler.ai.cloud.ovh.net,\n",$0)}' >> "$TCONFIG" # Write LLM7 API models, heavily rate-limited $REQ https://api.llm7.io/v1/models | jq -r '.data | map(select(.usage_based_only | not) | .id) | .[]' | awk '{printf("%s,-,https://api.llm7.io/v1,\n",$0)}' >> "$TCONFIG" # Write UncloseAI models $REQ https://hermes.ai.unturf.com/v1/models | jq -r '.data | .[] | .id' | awk '{printf("%s,-,https://hermes.ai.unturf.com/v1,\n",$0)}' >> "$TCONFIG" # Write AIHorde models, slow but community-powered $REQ https://oai.aihorde.net/v1/models | jq -r '.data | .[] | .id' | awk '{printf("%s,0000000000,https://oai.aihorde.net/v1,\n",$0)}' >> "$TCONFIG" ## Write some independent gateways found on HF $REQ https://mmoranguito-openai-nim-proxy.hf.space/v1/models | jq -r '.data | .[] | .id' | awk '{printf("%s,-,https://mmoranguito-openai-nim-proxy.hf.space/v1,\n",$0)}' >> "$TCONFIG" $REQ https://garystu-openai-nim-proxy.hf.space/v1/models | jq -r '.data | .[] | .id' | awk '{printf("%s,-,https://garystu-openai-nim-proxy.hf.space/v1,\n",$0)}' >> "$TCONFIG" $REQ https://zsnonsky-nim-proxy.hf.space/v1/models | jq -r '.data | .[] | .id' | awk '{printf("%s,-,https://zsnonsky-nim-proxy.hf.space/v1,\n",$0)}' >> "$TCONFIG" # this one works but is very slow, commenting out by default # $REQ https://covariate-my-nvidia-proxy.hf.space/v1/models | jq -r '.data | .[] | .id' | awk '{printf "%s,-,https://covariate-my-nvidia-proxy.hf.space/v1,\n",$0}' >> "$TCONFIG" # Write XORTRON as hardcode echo 'xortron,-,https://darkc0de-chat.hf.space/v1,'>> "$TCONFIG" ### Uncomment for G4F public-hosted models (50 req per hour per IP keyless) ## Write G4F models (community backend) #$REQ https://g4f.space/api/community/models | jq -r '.data | .[] | .id' | awk '{printf "%s,-,https://g4f.space/api/community,\n",$0}' >> "$TCONFIG" ## Write G4F models (gemini-v1beta backend) #$REQ https://g4f.space/api/gemini-v1beta/models | jq -r '.data | .[] | .id' | awk '{printf "%s,-,https://g4f.space/api/gemini-v1beta,\n",$0}' >> "$TCONFIG" ## Write G4F models (Qwen backend) #$REQ https://g4f.space/api/Qwen/models | jq -r '.data | .[] | .id' | awk '{printf "%s,-,https://g4f.space/api/Qwen,\n",$0}' >> "$TCONFIG" ## Write G4F models (QwenCode backend) #$REQ https://g4f.space/api/QwenCode/models | jq -r '.data | .[] | .id' | awk '{printf "%s,-,https://g4f.space/api/QwenCode,\n",$0}' >> "$TCONFIG" ## Write G4F models (GLM backend) #$REQ https://g4f.space/api/GLM/models | jq -r '.data | .[] | .id' | awk '{printf "%s,-,https://g4f.space/api/GLM,\n",$0}' >> "$TCONFIG" ## Write G4F models (OpenRouterFree backend) #$REQ https://g4f.space/api/OpenRouterFree/models | jq -r '.data | .[] | .id' | awk '{printf "%s,-,https://g4f.space/api/OpenRouterFree,\n",$0}' >> "$TCONFIG" ## Write G4F models (HuggingFace backend) #$REQ https://g4f.space/api/HuggingFace/models | jq -r '.data | .[] | .id' | awk '{printf "%s,-,https://g4f.space/api/HuggingFace,\n",$0}' >> "$TCONFIG" ## Write G4F models (HuggingChat backend) #$REQ https://g4f.space/api/HuggingChat/models | jq -r '.data | .[] | .id' | awk '{printf "%s,-,https://g4f.space/api/HuggingChat,\n",$0}' >> "$TCONFIG" ## Write G4F models (OpenaiChat backend) #$REQ https://g4f.space/api/OpenaiChat/models | jq -r '.data | .[] | .id' | awk '{printf "%s,-,https://g4f.space/api/OpenaiChat,\n",$0}' >> "$TCONFIG" ## Write G4F models (NVidia backend) #$REQ https://g4f.space/api/nvidia/models | jq -r '.data | .[] | .id' | awk '{printf "%s,-,https://g4f.space/api/nvidia,\n",$0}' >> "$TCONFIG" ## Write G4F models (Ollama backend) #$REQ https://g4f.space/api/ollama/models | jq -r '.data | .[] | .id' | awk '{printf "%s,-,https://g4f.space/api/ollama,\n",$0}' >> "$TCONFIG" ## Write G4F models (Groq backend) #$REQ https://g4f.space/api/groq/models | jq -r '.data | .[] | .id' | awk '{printf "%s,-,https://g4f.space/api/groq,\n",$0}' >> "$TCONFIG" # Write the config header printf 'model,key,endpoint,extra\n' > "$CONFIG" # Finalize the config sort -u "$TCONFIG" >> "$CONFIG" rm -f "$TCONFIG"