52 lines
2.5 KiB
Bash
Executable File
52 lines
2.5 KiB
Bash
Executable File
#!/bin/sh
|
|
# Free model collector script for Dynagate
|
|
# Depends upon curl 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
|
|
$REQ https://opencode.ai/zen/v1/models | jq -r '.data[] | select(.id | test("-free")) | "\(.id),-,https://opencode.ai/zen/v1,"' >> "$TCONFIG"
|
|
|
|
# Write Kilo free models
|
|
$REQ https://api.kilo.ai/api/openrouter/models | jq -r '.data[] | select(.isFree) | "\(.id),-,https://api.kilo.ai/api/openrouter,"' >> "$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),-,https://oai.endpoints.kepler.ai.cloud.ovh.net,"' >> "$TCONFIG"
|
|
|
|
# Write LLM7 API models, heavily rate-limited
|
|
$REQ https://api.llm7.io/v1/models | jq -r '.data[] | select(.usage_based_only | not) | "\(.id),-,https://api.llm7.io/v1,"' >> "$TCONFIG"
|
|
|
|
# Write UncloseAI models
|
|
$REQ https://hermes.ai.unturf.com/v1/models | jq -r '.data[] | "\(.id),-,https://hermes.ai.unturf.com/v1,"' >> "$TCONFIG"
|
|
|
|
# Write AIHorde models, slow but community-powered
|
|
$REQ https://oai.aihorde.net/v1/models | jq -r '.data[] | "\(.id),0000000000,https://oai.aihorde.net/v1,"' >> "$TCONFIG"
|
|
|
|
# Write Pekpik models (need to be rotated frequently, highly experimental, commented out by default)
|
|
# $REQ https://aiapiv2.pekpik.com/free-keys.json | jq -r '.keys[] | "\(.model),\(.key),https://aiapiv2.pekpik.com/v1,"' >> "$TCONFIG"
|
|
|
|
## Write some independent gateways found on HF
|
|
|
|
$REQ https://mmoranguito-openai-nim-proxy.hf.space/v1/models | jq -r '.data[] | "\(.id),-,https://mmoranguito-openai-nim-proxy.hf.space/v1,"' >> "$TCONFIG"
|
|
|
|
$REQ https://garystu-openai-nim-proxy.hf.space/v1/models | jq -r '.data[] | "\(.id),-,https://garystu-openai-nim-proxy.hf.space/v1,"' >> "$TCONFIG"
|
|
|
|
$REQ https://zsnonsky-nim-proxy.hf.space/v1/models | jq -r '.data[] | "\(.id),-,https://zsnonsky-nim-proxy.hf.space/v1,"' >> "$TCONFIG"
|
|
|
|
# this one works but is very slow, commented out by default
|
|
# $REQ https://covariate-my-nvidia-proxy.hf.space/v1/models | jq -r '.data[] | "\(.id),-,https://covariate-my-nvidia-proxy.hf.space/v1,"' >> "$TCONFIG"
|
|
|
|
# Write XORTRON as hardcode
|
|
echo 'xortron,-,https://darkc0de-chat.hf.space/v1,'>> "$TCONFIG"
|
|
|
|
# Write the config header
|
|
printf 'model,key,endpoint,extra\n' > "$CONFIG"
|
|
# Finalize the config
|
|
sort -u "$TCONFIG" | grep -v embed >> "$CONFIG"
|
|
rm -f "$TCONFIG"
|
|
|
|
exit 0
|