# Alchemy Photon APIs for Solana ZK Compression

> Alchemy Photon APIs for Solana ZK Compression

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

## Background

Alchemy supports the [Photon](https://github.com/helius-labs/photon) indexer, an open-source ZK Compression indexer maintained by Helius. These endpoints let you read [ZK Compressed](https://www.zkcompression.com/) Solana state — accounts, token balances, and transaction signatures — through the same familiar JSON-RPC surface used for standard Solana calls.

ZK Compression stores most of an account's data offchain in a merkle tree while keeping a small commitment onchain, letting applications mint and manage thousands of accounts or tokens at a fraction of the normal rent cost. Photon indexes those compressed accounts and exposes them through the methods below, following the [Photon API specification](https://github.com/helius-labs/photon).

These endpoints are served through the standard Solana Alchemy endpoints (`https://solana-mainnet.g.alchemy.com/v2/<API_KEY>` and `https://solana-devnet.g.alchemy.com/v2/<API_KEY>`), so you can call them with the same client you already use for Solana Core RPC.

## Methods

| Method | Function | CU cost | Throughput CUs (how many CUs this will count for towards your CUs per second capacity) |
| --- | --- | --- | --- |
| [getCompressedAccount](/docs/chains/solana/solana-photon-api/solana-photon-api/get-compressed-account) | Returns the compressed account with the given address or hash. | 120 | 100 |
| [getCompressedAccountProof](/docs/chains/solana/solana-photon-api/solana-photon-api/get-compressed-account-proof) | Returns a merkle proof for the compressed account with the given hash. | 120 | 100 |
| [getCompressedAccountsByOwner](/docs/chains/solana/solana-photon-api/solana-photon-api/get-compressed-accounts-by-owner) | Returns the owner's compressed accounts. | 120 | 100 |
| [getCompressedBalance](/docs/chains/solana/solana-photon-api/solana-photon-api/get-compressed-balance) | Returns the balance for the compressed account with the given address or hash. | 120 | 100 |
| [getCompressedBalanceByOwner](/docs/chains/solana/solana-photon-api/solana-photon-api/get-compressed-balance-by-owner) | Returns the total balance of the owner's compressed accounts. | 120 | 100 |
| [getCompressedMintTokenHolders](/docs/chains/solana/solana-photon-api/solana-photon-api/get-compressed-mint-token-holders) | Returns the owner balances for a given mint in descending order, for compressed tokens. | 120 | 100 |
| [getCompressedTokenAccountBalance](/docs/chains/solana/solana-photon-api/solana-photon-api/get-compressed-token-account-balance) | Returns the balance for a given compressed token account. | 120 | 100 |
| [getCompressedTokenAccountsByDelegate](/docs/chains/solana/solana-photon-api/solana-photon-api/get-compressed-token-accounts-by-delegate) | Returns the compressed token accounts that are partially or fully delegated to the given delegate. | 120 | 100 |
| [getCompressedTokenAccountsByOwner](/docs/chains/solana/solana-photon-api/solana-photon-api/get-compressed-token-accounts-by-owner) | Returns the compressed token accounts owned by the given Pubkey. | 120 | 100 |
| [getCompressedTokenBalancesByOwner](/docs/chains/solana/solana-photon-api/solana-photon-api/get-compressed-token-balances-by-owner) | Returns the compressed token balances for the given Pubkey. | 120 | 100 |
| [getCompressedTokenBalancesByOwnerV2](/docs/chains/solana/solana-photon-api/solana-photon-api/get-compressed-token-balances-by-owner-v-2) | Returns the compressed token balances for the given Pubkey, with pagination. | 120 | 100 |
| [getCompressionSignaturesForAccount](/docs/chains/solana/solana-photon-api/solana-photon-api/get-compression-signatures-for-account) | Returns the signatures of transactions that closed or opened a compressed account with the given hash. | 120 | 100 |
| [getCompressionSignaturesForAddress](/docs/chains/solana/solana-photon-api/solana-photon-api/get-compression-signatures-for-address) | Returns the signatures of transactions that have modified an address's compressed account. | 120 | 100 |
| [getCompressionSignaturesForOwner](/docs/chains/solana/solana-photon-api/solana-photon-api/get-compression-signatures-for-owner) | Returns the signatures of transactions that have modified the owner's compressed accounts. | 120 | 100 |
| [getCompressionSignaturesForTokenOwner](/docs/chains/solana/solana-photon-api/solana-photon-api/get-compression-signatures-for-token-owner) | Returns the signatures of transactions that have modified the owner's compressed token accounts. | 120 | 100 |
| [getLatestCompressionSignatures](/docs/chains/solana/solana-photon-api/solana-photon-api/get-latest-compression-signatures) | Returns the signatures of the latest transactions that used the compression program. | 120 | 100 |
| [getLatestNonVotingSignatures](/docs/chains/solana/solana-photon-api/solana-photon-api/get-latest-non-voting-signatures) | Returns the signatures of the latest non-voting transactions. | 120 | 100 |
| [getMultipleCompressedAccountProofs](/docs/chains/solana/solana-photon-api/solana-photon-api/get-multiple-compressed-account-proofs) | Returns multiple compressed account proofs. | 120 | 100 |
| [getMultipleCompressedAccounts](/docs/chains/solana/solana-photon-api/solana-photon-api/get-multiple-compressed-accounts) | Returns multiple compressed accounts, identified by address or hash. | 120 | 100 |
| [getMultipleNewAddressProofs](/docs/chains/solana/solana-photon-api/solana-photon-api/get-multiple-new-address-proofs) | Returns proofs that the new addresses are not taken and can be created. | 120 | 100 |
| [getMultipleNewAddressProofsV2](/docs/chains/solana/solana-photon-api/solana-photon-api/get-multiple-new-address-proofs-v-2) | Returns proofs that the new addresses are not taken and can be created (v2). | 120 | 100 |
| [getTransactionWithCompressionInfo](/docs/chains/solana/solana-photon-api/solana-photon-api/get-transaction-with-compression-info) | Returns the transaction data for the given signature along with parsed compression info. | 120 | 100 |
| [getValidityProof](/docs/chains/solana/solana-photon-api/solana-photon-api/get-validity-proof) | Returns a single ZK Validity proof for compressed accounts and new addresses. | 1200 † | 500 † |
| [getValidityProofV2](/docs/chains/solana/solana-photon-api/solana-photon-api/get-validity-proof-v-2) | Returns a single ZK Validity proof for compressed accounts and new addresses (v2). | 1200 † | 500 † |
| [getIndexerHealth](/docs/chains/solana/solana-photon-api/solana-photon-api/get-indexer-health) | Returns an error if the indexer is stale by more than a configured number of blocks, otherwise returns `ok`. | 120 | 100 |
| [getIndexerSlot](/docs/chains/solana/solana-photon-api/solana-photon-api/get-indexer-slot) | Returns the slot of the latest block the indexer has processed. | 120 | 100 |

† `getValidityProof` and `getValidityProofV2` run against the prover service and use an extended 30,000&nbsp;ms request timeout.