Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
88 changes: 88 additions & 0 deletions .github/workflows/model-catalog.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
name: Model catalog

on:
pull_request:
branches: [main]
push:
branches: [main]
workflow_dispatch:
schedule:
- cron: "23 04 * * *"

permissions:
contents: read

jobs:
verify:
if: github.event_name == 'pull_request' || github.event_name == 'push'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
node-version: 22
- run: node --test catalog.test.mjs
- run: node sync-models.mjs --offline --check

refresh:
if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest
concurrency:
group: hex-model-catalog-refresh
cancel-in-progress: false
permissions:
contents: write
pull-requests: write
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
ref: main
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
node-version: 22
- name: Refresh from the public HEX catalog
run: |
node sync-models.mjs
node --test catalog.test.mjs
node sync-models.mjs --offline --check
- name: Open or update a draft review
env:
GH_TOKEN: ${{ github.token }}
CATALOG_PR_TOKEN: ${{ secrets.CATALOG_PR_TOKEN }}
run: |
set -euo pipefail
git add -- MODEL-INDEX.md UNCENSORED-MODELS.md models.json models/
if git diff --cached --quiet; then
echo "The catalog already matches the public HEX feed."
exit 0
fi

branch=automation/model-catalog
ref="refs/heads/$branch"
remote_commit="$(git ls-remote origin "$ref" | cut -f1)"
git switch -c "$branch"
git -c user.name='github-actions[bot]' \
-c user.email='41898282+github-actions[bot]@users.noreply.github.com' \
commit -m "Refresh HEX model catalog"
git push --force-with-lease="$ref:$remote_commit" origin "HEAD:$ref"

existing="$(gh pr list --base main --head "$branch" --state open --json number --jq '.[0].number // empty')"
if [ -n "$existing" ]; then
echo "Updated draft review #$existing."
else
if ! result="$(GH_TOKEN="${CATALOG_PR_TOKEN:-$GH_TOKEN}" gh pr create --draft --base main --head "$branch" \
--title "Refresh HEX model catalog" \
--body "Generated from the public HEX model catalog. Review model IDs, variant labels, and documentation before merging." 2>&1)"; then
if [ -n "$CATALOG_PR_TOKEN" ] || ! grep -qi 'GitHub Actions is not permitted to create or approve pull requests' <<<"$result"; then
printf '%s\n' "$result" >&2
exit 1
fi
compare="${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/compare/main...${branch}?expand=1"
echo "::warning::The organization restricts automatic pull request creation. Open the draft from the workflow summary."
printf 'The generated branch is ready. [Open a review](%s).\n' "$compare" >> "$GITHUB_STEP_SUMMARY"
else
printf '%s\n' "$result"
fi
fi
62 changes: 32 additions & 30 deletions API-FORMATS.md
Original file line number Diff line number Diff line change
@@ -1,30 +1,32 @@
# HEX API formats and model availability

## Discover models

Use the [active model index](MODEL-INDEX.md) to pick an API ID. Your account's authenticated model response lists the models it can discover at request time.

~~~bash
curl --fail-with-body https://api.hexapi.io/v1/models \
-H "Authorization: Bearer $HEX_API_KEY"
~~~

The GitHub index is a snapshot of the public HEX catalog. It includes entries whose availability field was true when the list was refreshed. Use the [status page](https://hexapi.io/status) before production jobs and recheck model availability after an error.

## Pick the request format

Use the [HEX API reference](https://hexapi.io/docs) to select the format supported by your model and client.

| Format | Typical integration |
| --- | --- |
| Chat Completions | OpenAI-style message history with a chat model such as GLM or DeepSeek |
| Responses | Supported GPT integrations that expect the Responses API |
| Messages | Supported Claude integrations that expect the Messages API |

Each API request should use one model ID and one request format. Verify streaming, tool calls, reasoning parameters, and image support for that specific model before enabling them in your app.

## Match usage to price

[Live token pricing](https://hexapi.io/pricing) shows the current rates. Budget for the input and output your workflow creates. Check the usage returned with the response before comparing different models, and keep your HEX key on your own server or development machine.

[Quickstart](https://github.com/hexapi-io/hex-api-quickstart) · [OpenCode Desktop setup](https://hexapi.io/setup/opencode)
# HEX API formats and model availability

## Discover models

Use the [active model index](MODEL-INDEX.md) to pick an API ID. Your account's authenticated model response lists the models it can discover at request time.

~~~bash
curl --fail-with-body https://api.hexapi.io/v1/models \
-H "Authorization: Bearer $HEX_API_KEY"
~~~

The GitHub index is a snapshot of the public HEX catalog. It includes entries whose availability field was true when the list was refreshed. Use the [status page](https://hexapi.io/status) before production jobs and recheck model availability after an error.

## Pick the request format

Use the [HEX API reference](https://hexapi.io/docs) to select the format supported by your model and client.

| Format | Typical integration |
| --- | --- |
| Chat Completions | OpenAI-style message history with a chat model such as GLM or DeepSeek |
| Responses | Supported GPT integrations that expect the Responses API |
| Messages | Supported Claude integrations that expect the Messages API |

Each API request should use one model ID and one request format. Verify streaming, tool calls, reasoning parameters, and image support for that specific model before enabling them in your app.

For a runnable request, open the model's page or start with the [GPT Responses example](GPT-GUIDE.md), [Claude Messages example](CLAUDE-GUIDE.md), or [Chat Completions quickstart](https://github.com/hexapi-io/hex-api-quickstart).

## Match usage to price

[Live token pricing](https://hexapi.io/pricing) shows the current rates. Budget for the input and output your workflow creates. Check the usage returned with the response before comparing different models, and keep your HEX key on your own server or development machine.

[Quickstart](https://github.com/hexapi-io/hex-api-quickstart) · [OpenCode Desktop setup](https://hexapi.io/setup/opencode)
24 changes: 24 additions & 0 deletions BILLING-AND-TROUBLESHOOTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# HEX pricing, usage, and troubleshooting

## Check price and usage

HEX uses a pay-as-you-go USD balance. Consult [live pricing](https://hexapi.io/pricing) and your account's own rates before running a workload. Individual models have separate rates for input, output, cache reads, and cache writes where available. Your client format can report these counters differently.

Use the cost estimator on the pricing page. Enter each token category once. When an API reports a total prompt count that includes cached tokens, use the usage breakdown to separate ordinary input from any tokens charged at cache rates.

After a call, check the API usage fields and compare them with the usage view in your [HEX account](https://hexapi.io/app). A request can have a temporary reservation and a later settlement. Review the final usage and settlement before reconciling the cost.

## Diagnose a request

| Symptom | Check first |
| --- | --- |
| Unauthorized request | Confirm the key belongs to the intended account, the base URL is `https://api.hexapi.io`, and the auth header matches the endpoint. |
| Model or endpoint unavailable | Compare the exact ID and request format with the [active model index](MODEL-INDEX.md). Check [service status](https://hexapi.io/status). |
| Empty or interrupted stream | Read all events, including completion, usage, and errors. Test a short text request in the same API format. |
| Output stops early | Inspect the completion status or stop reason. Adjust the output budget within the model's limits and check whether reasoning consumed part of it. |
| HTTP 502 | Record the request ID if present, model ID, format, and time. Check status. Review whether the original request completed or incurred usage before retrying. |
| Insufficient balance | Check available balance and the request's input size and maximum output. Try a smaller request or top up through your account if needed. |

When [contacting HEX support](https://hexapi.io/support), send the request ID and technical context. Keep API keys and private prompts out of the report.

[API formats](API-FORMATS.md) · [Model index](MODEL-INDEX.md) · [Integration guides](INTEGRATIONS.md)
19 changes: 11 additions & 8 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
# Catalog changelog

## 2026-11-21

- Expanded the GitHub index to every model marked available by the live HEX catalog.
- Added an exact-ID table by model family and a script to refresh it alongside the JSON.
- Added API format, model behavior evaluation, and AI jailbreak terminology guides.
- Expanded the GLM and DeepSeek repository references with model variant comparisons.
# Catalog changelog

## 2026-11-21

- Added individual model pages, a dedicated Uncensored and Abliterated index, and GPT and Claude request guides.
- Added SDK and IDE guidance, a native-format request example, and a pricing and troubleshooting guide.
- Added catalog validation and a daily refresh workflow that proposes changes for review.
- Expanded the GitHub index to every model marked available by the live HEX catalog.
- Added an exact-ID table by model family and a script to refresh it alongside the JSON.
- Added API format, model behavior evaluation, and AI jailbreak terminology guides.
- Expanded the GLM and DeepSeek repository references with model variant comparisons.
26 changes: 26 additions & 0 deletions CLAUDE-GUIDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Claude models through the HEX Messages API

Choose the exact version you want from the [Claude model list](MODEL-INDEX.md#claude). This example uses the Messages format and a short text prompt.

```sh
node request-example.mjs claude-sonnet-5-5 --dry-run
```

With `HEX_API_KEY` set in your environment, omit `--dry-run` to submit a billable request.

```sh
curl --fail-with-body 'https://api.hexapi.io/v1/messages' \
-H "x-api-key: $HEX_API_KEY" \
-H 'anthropic-version: 2023-06-01' \
-H 'Content-Type: application/json' \
-d '{"model":"claude-sonnet-5-5","max_tokens":512,"messages":[{"role":"user","content":"Write a one-line software release title."}]}'
```

- Read the text blocks in `content`, and treat tool-use blocks as separate structured output.
- Read `stop_reason`. It tells you whether the model ended the turn, hit an output limit, or requested a tool.
- If streaming, consume the complete event stream and inspect the final stop reason before processing the output.
- Use the native Messages body when moving an integration from Chat Completions. See the individual model page for its workspace capabilities.

Use the [HEX Claude Code setup](https://hexapi.io/setup/claude-code) or [HEX for OpenCode Desktop](https://hexapi.io/setup/opencode) when working in an existing project.

[Model index](MODEL-INDEX.md) · [Other API formats](API-FORMATS.md) · [Troubleshooting](BILLING-AND-TROUBLESHOOTING.md)
29 changes: 17 additions & 12 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
# Contributing

Report catalog corrections with the exact HEX API model ID, the page or file that needs updating, and a link to the matching entry in the [live catalog](https://hexapi.io/models). Share fictional examples when an issue involves input or generated text.

To update the catalog files locally:

~~~bash
node sync-models.mjs
node sync-models.mjs --check
~~~

Include both `MODEL-INDEX.md` and `models.json` when submitting a catalog refresh. Use the live pricing and status links for information that changes frequently.
# Contributing

Report catalog corrections with the exact HEX API model ID, the page or file that needs updating, and a link to the matching entry in the [live catalog](https://hexapi.io/models). Share fictional examples when an issue involves input or generated text.

To update the catalog files locally:

~~~bash
node sync-models.mjs
node --test catalog.test.mjs
node sync-models.mjs --offline --check
~~~

Include the generated indexes, `models.json`, and `models/` pages in a catalog refresh. Retired models keep their existing URLs and move to the archive. Use the live pricing and status links for information that changes frequently.

The **Model catalog** workflow runs daily and can also be run from the Actions tab. It opens or updates a draft on the `automation/model-catalog` branch. Where organization policy blocks the workflow's built-in credential from creating pull requests, the workflow summary links to the comparison. A repository secret named `CATALOG_PR_TOKEN` can provide an approved credential scoped to pull request write access for this repository. Review changes before merging.

`capabilities.json` contains reviewed HEX workspace formats and settings. Add capabilities after reviewing the exact model ID against the deployed HEX configuration. New catalog IDs without a reviewed entry still receive a page.
25 changes: 25 additions & 0 deletions GPT-GUIDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# GPT models through the HEX Responses API

Use an active GPT model ID from the [GPT model list](MODEL-INDEX.md#gpt). Start with a text request, then open the model page for workspace capabilities and gateway limits.

```sh
node request-example.mjs gpt-6.2-sol --dry-run
```

With `HEX_API_KEY` set in your environment, omit `--dry-run` to submit a billable request. The script reports visible text, usage, and completion status.

```sh
curl --fail-with-body 'https://api.hexapi.io/v1/responses' \
-H "Authorization: Bearer $HEX_API_KEY" \
-H 'Content-Type: application/json' \
-d '{"model":"gpt-6.2-sol","input":"Write a one-line software release title.","max_output_tokens":512,"store":false}'
```

- Read visible answer text from output messages. Other output items may represent reasoning or a tool call.
- Check the response status and incomplete details before using a result. A low output limit can be consumed before the model writes visible text.
- In a streaming client, read through the terminal response event and handle incomplete or failed results.
- Review the model's capability notes before sending images, function definitions, or reasoning settings.

For a local development project, use the [HEX Codex setup guide](https://hexapi.io/setup/codex) or [HEX for OpenCode Desktop](https://hexapi.io/setup/opencode).

[Model index](MODEL-INDEX.md) · [Other API formats](API-FORMATS.md) · [Troubleshooting](BILLING-AND-TROUBLESHOOTING.md)
24 changes: 24 additions & 0 deletions INTEGRATIONS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Use HEX from an SDK or coding tool

Get an API key from your HEX account and pick a model from the [active catalog](MODEL-INDEX.md). The model page identifies the format that HEX workspace uses for that ID. Keep the key in your environment, development tool, or server configuration.

## Run one request

| API format | Example | Start here |
| --- | --- | --- |
| Chat Completions | `node request-example.mjs glm-5.3-abliterated` | [Chat quickstart](https://github.com/hexapi-io/hex-api-quickstart) |
| Responses | `node request-example.mjs gpt-6.2-sol` | [GPT guide](GPT-GUIDE.md) |
| Messages | `node request-example.mjs claude-sonnet-5-5` | [Claude guide](CLAUDE-GUIDE.md) |

Add `--dry-run` to print the URL and JSON without a key, network request, or usage charge.

## Work in your editor

- [OpenCode Desktop](https://hexapi.io/setup/opencode) for local projects and selection among HEX model groups.
- [Claude Code](https://hexapi.io/setup/claude-code) for Claude workflows that use the Messages format.
- [Codex](https://hexapi.io/setup/codex) for supported GPT workflows that use Responses.
- [Cursor](https://hexapi.io/setup/cursor) for current HEX compatibility notes and alternatives where custom API settings are restricted.

The HEX setup selector lists the applicable Windows, macOS, and Linux instructions for each tool. Check your tool's documented compatibility before choosing a model with image input, function tools, or reasoning settings.

[HEX API reference](https://hexapi.io/docs) · [Billing and troubleshooting](BILLING-AND-TROUBLESHOOTING.md)
Loading