# Hex on Onekey > 3 endpoints for Hex (3 stable, 0 beta), 1 to 5 credits each. Category: Developer platforms. One key, one JSON shape. Base URL: https://api.onekey.dev Auth: header `x-api-key: `. Call shape: `GET /v1/{platform}/{endpoint}?{params}`. Every response is `{success, data, metadata, error}`; check `success` first. Cost is in `metadata.credits_charged`. Free when served from cache (0.2 credit for a cached response over 100 KB). Failed and not-found calls are refunded. Status: stable = verified against the live source; beta = not yet verified, fields may be missing. Page: https://onekey.dev/platforms/hex Reference (Markdown): https://onekey.dev/docs/api/hex.md All docs: https://onekey.dev/llms.txt ## Canonical fields returned Unified-schema fields (same names on every platform), with how many of the 3 mapped Hex endpoints return each: - `package.version` (string): 3 - `entity.createdAt` (ISO 8601 date): 2 - `entity.description` (string): 2 - `entity.name` (string): 2 - `entity.stats.downloads` (integer): 2 - `entity.updatedAt` (ISO 8601 date): 2 - `entity.url` (URL): 2 - `package.documentationUrl` (URL): 1 - plus 4 platform-specific fields under `ext.` ## Endpoints ### hex.package Metadata of a Hex (Elixir/Erlang) package. - Price: 1 credit per fresh call. Status: stable. Returns: one record. - Request: `GET https://api.onekey.dev/v1/hex/package?name=phoenix` with header `x-api-key: YOUR_API_KEY` - Parameters: - `name` (string, required): Hex package name - Fields returned: `entity.name`, `package.version`, `entity.description`, `entity.url`, `package.documentationUrl`, `entity.stats.downloads`, `entity.createdAt`, `entity.updatedAt`, `ext.licenses`, `ext.recentDownloads` - Reference: https://onekey.dev/docs/api/hex/package.md ### hex.search Search Hex packages. - Price: 5 credits per fresh call. Status: stable. Returns: a list. - Request: `GET https://api.onekey.dev/v1/hex/search?q=phoenix` with header `x-api-key: YOUR_API_KEY` - Parameters: - `q` (string, required): Search query - Fields returned: `entity.name`, `package.version`, `entity.description`, `entity.url`, `entity.stats.downloads`, `entity.updatedAt`, `ext.recentDownloads` - Reference: https://onekey.dev/docs/api/hex/search.md ### hex.versions Releases of a Hex package. - Price: 5 credits per fresh call. Status: stable. Returns: a list. - Request: `GET https://api.onekey.dev/v1/hex/versions?name=phoenix` with header `x-api-key: YOUR_API_KEY` - Parameters: - `name` (string, required): Hex package name - Fields returned: `package.version`, `entity.createdAt`, `ext.hasDocs`, `ext.apiUrl` - Reference: https://onekey.dev/docs/api/hex/versions.md ## Sample request ```bash curl "https://api.onekey.dev/v1/hex/package?name=phoenix" \ -H "x-api-key: YOUR_API_KEY" ```