2026-07-11 00:39:24 +03:00
|
|
|
#!/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'
|
2026-07-11 09:06:37 +03:00
|
|
|
TCONFIG="$(mktemp)"
|
2026-07-11 00:39:24 +03:00
|
|
|
|
|
|
|
|
# Write OpenCode Zen free models
|
2026-07-11 09:06:37 +03:00
|
|
|
$REQ https://opencode.ai/zen/v1/models | jq -r '.data | map(select(.id | test("-free")) | .id) | .[]' | awk '{printf "%s,-,https://opencode.ai/zen,\n",$0}' >> "$TCONFIG"
|
2026-07-11 00:39:24 +03:00
|
|
|
|
|
|
|
|
# Write Kilo free models
|
2026-07-11 09:06:37 +03:00
|
|
|
$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"
|
2026-07-11 00:39:24 +03:00
|
|
|
|
2026-07-11 09:06:37 +03:00
|
|
|
# Write OVHCloud free trial models (2 req per minute per IP keyless)
|
2026-07-11 09:07:53 +03:00
|
|
|
$REQ https://oai.endpoints.kepler.ai.cloud.ovh.net/v1/models | jq -r '.data | .[] | .id' | grep -viE 'diffusion|whisper|ppl|guard|embedding|bge-' | awk '{printf "%s,-,https://oai.endpoints.kepler.ai.cloud.ovh.net,\n",$0}' >> "$TCONFIG"
|
2026-07-11 00:39:24 +03:00
|
|
|
|
2026-07-11 09:06:37 +03:00
|
|
|
### Uncomment for G4F public-hosted models (50 req per hour per IP keyless)
|
2026-07-11 00:39:24 +03:00
|
|
|
|
2026-07-11 09:06:37 +03:00
|
|
|
## 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"
|
2026-07-11 00:39:24 +03:00
|
|
|
|
2026-07-11 09:06:37 +03:00
|
|
|
## 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"
|