Estimate Program Invocation Compute Units Solana
This endpoint estimates the number of compute units an arbitrary Solana program invocation would consume. You provide the program to call, the base64-encoded instruction data, and the list of accounts the instruction references; the transaction is built and simulated against the node (without being broadcast) and the simulated compute units consumed are returned. This is the Solana analogue of estimating contract-interaction gas on EVM chains. Use it to size a ComputeBudget instruction before submitting the transaction.
Path Parameters
Represents the name of the blockchain network used; blockchain networks are usually identical as technology and software, but they differ in data, e.g. - "mainnet" is the live network with actual data while a network like "devnet" is a test network.
Query Parameters
In batch situations the user can use the context to correlate responses with requests. This property is present regardless of whether the response was successful or returned as an error. context is specified by the user.
Request Body Schema application/json
In batch situations the user can use the context to correlate responses with requests. This property is present regardless of whether the response was successful or returned as an error. context is specified by the user.
Base58 string representation of the fee payer pubkey (the account that pays for and signs the transaction).
Base58 string representation of the program pubkey to invoke (the on-chain program the instruction calls).
Base64-encoded instruction data bytes passed to the program. May be an empty string for instructions that take no data.
Array of the accounts referenced by the instruction (Solana AccountMeta entries), in the order the program expects them. May be empty.
Base58 string representation of the account pubkey referenced by the instruction.
Whether this account must sign the transaction.
Whether the instruction may modify this account's data or lamports.
Response Schema
Specifies the version of the API that incorporates this endpoint.
Defines the ID of the request. The requestId is generated by Crypto APIs and it's unique for every request.
In batch situations the user can use the context to correlate responses with requests. This property is present regardless of whether the response was successful or returned as an error. context is specified by the user.
String-encoded integer of the simulated compute units the program invocation would consume.
Specifies the version of the API that incorporates this endpoint.
Defines the ID of the request. The requestId is generated by Crypto APIs and it's unique for every request.
In batch situations the user can use the context to correlate responses with requests. This property is present regardless of whether the response was successful or returned as an error. context is specified by the user.
Specifies an error code, e.g. error 404.
Specifies the message of the error, i.e. why the error was returned, e.g. error 404 stands for “not found”.
Specifies an attribute of the error by name.
Specifies the details of an attribute as part from the error.
Specifies an error code, e.g. error 404.
Specifies the message of the error, i.e. why the error was returned, e.g. error 404 stands for “not found”.
Specifies an attribute of the error by name.
Specifies the details of an attribute as part from the error.
Specifies an error code, e.g. error 404.
Specifies the message of the error, i.e. why the error was returned, e.g. error 404 stands for “not found”.
Specifies an attribute of the error by name.
Specifies the details of an attribute as part from the error.
Specifies the version of the API that incorporates this endpoint.
Defines the ID of the request. The requestId is generated by Crypto APIs and it's unique for every request.
In batch situations the user can use the context to correlate responses with requests. This property is present regardless of whether the response was successful or returned as an error. context is specified by the user.
Specifies an error code, e.g. error 404.
Specifies the message of the error, i.e. why the error was returned, e.g. error 404 stands for “not found”.
Specifies an attribute of the error by name.
Specifies the details of an attribute as part from the error.
Specifies an error code, e.g. error 404.
Specifies the message of the error, i.e. why the error was returned, e.g. error 404 stands for “not found”.
Specifies an attribute of the error by name.
Specifies the details of an attribute as part from the error.
Specifies the version of the API that incorporates this endpoint.
Defines the ID of the request. The requestId is generated by Crypto APIs and it's unique for every request.
In batch situations the user can use the context to correlate responses with requests. This property is present regardless of whether the response was successful or returned as an error. context is specified by the user.
Specifies an error code, e.g. error 404.
Specifies the message of the error, i.e. why the error was returned, e.g. error 404 stands for “not found”.
Specifies an attribute of the error by name.
Specifies the details of an attribute as part from the error.
Specifies an error code, e.g. error 404.
Specifies the message of the error, i.e. why the error was returned, e.g. error 404 stands for “not found”.
Specifies an attribute of the error by name.
Specifies the details of an attribute as part from the error.
Specifies an error code, e.g. error 404.
Specifies the message of the error, i.e. why the error was returned, e.g. error 404 stands for “not found”.
Specifies an attribute of the error by name.
Specifies the details of an attribute as part from the error.
Specifies an error code, e.g. error 404.
Specifies the message of the error, i.e. why the error was returned, e.g. error 404 stands for “not found”.
Specifies an attribute of the error by name.
Specifies the details of an attribute as part from the error.
Specifies the version of the API that incorporates this endpoint.
Defines the ID of the request. The requestId is generated by Crypto APIs and it's unique for every request.
In batch situations the user can use the context to correlate responses with requests. This property is present regardless of whether the response was successful or returned as an error. context is specified by the user.
Specifies an error code, e.g. error 404.
Specifies the message of the error, i.e. why the error was returned, e.g. error 404 stands for “not found”.
Specifies an attribute of the error by name.
Specifies the details of an attribute as part from the error.
Specifies an error code, e.g. error 404.
Specifies the message of the error, i.e. why the error was returned, e.g. error 404 stands for “not found”.
Specifies an attribute of the error by name.
Specifies the details of an attribute as part from the error.
Specifies an error code, e.g. error 404.
Specifies the message of the error, i.e. why the error was returned, e.g. error 404 stands for “not found”.
Specifies an attribute of the error by name.
Specifies the details of an attribute as part from the error.
Specifies an error code, e.g. error 404.
Specifies the message of the error, i.e. why the error was returned, e.g. error 404 stands for “not found”.
Specifies an attribute of the error by name.
Specifies the details of an attribute as part from the error.
Specifies the version of the API that incorporates this endpoint.
Defines the ID of the request. The requestId is generated by Crypto APIs and it's unique for every request.
In batch situations the user can use the context to correlate responses with requests. This property is present regardless of whether the response was successful or returned as an error. context is specified by the user.
invalid_data
Specifies an error code, e.g. error 404.
Specifies the message of the error, i.e. why the error was returned, e.g. error 404 stands for “not found”.
Specifies an attribute of the error by name.
Specifies the details of an attribute as part from the error.
Specifies the version of the API that incorporates this endpoint.
Defines the ID of the request. The requestId is generated by Crypto APIs and it's unique for every request.
In batch situations the user can use the context to correlate responses with requests. This property is present regardless of whether the response was successful or returned as an error. context is specified by the user.
unsupported_media_type
Specifies an error code, e.g. error 404.
Specifies the message of the error, i.e. why the error was returned, e.g. error 404 stands for “not found”.
Specifies an attribute of the error by name.
Specifies the details of an attribute as part from the error.
Specifies the version of the API that incorporates this endpoint.
Defines the ID of the request. The requestId is generated by Crypto APIs and it's unique for every request.
In batch situations the user can use the context to correlate responses with requests. This property is present regardless of whether the response was successful or returned as an error. context is specified by the user.
invalid_request_body_structure
Specifies an error code, e.g. error 404.
Specifies the message of the error, i.e. why the error was returned, e.g. error 404 stands for “not found”.
Specifies an attribute of the error by name.
Specifies the details of an attribute as part from the error.
Specifies the version of the API that incorporates this endpoint.
Defines the ID of the request. The requestId is generated by Crypto APIs and it's unique for every request.
In batch situations the user can use the context to correlate responses with requests. This property is present regardless of whether the response was successful or returned as an error. context is specified by the user.
request_limit_reached
Specifies an error code, e.g. error 404.
Specifies the message of the error, i.e. why the error was returned, e.g. error 404 stands for “not found”.
Specifies an attribute of the error by name.
Specifies the details of an attribute as part from the error.
Specifies the version of the API that incorporates this endpoint.
Defines the ID of the request. The requestId is generated by Crypto APIs and it's unique for every request.
In batch situations the user can use the context to correlate responses with requests. This property is present regardless of whether the response was successful or returned as an error. context is specified by the user.
unexpected_server_error
Specifies an error code, e.g. error 404.
Specifies the message of the error, i.e. why the error was returned, e.g. error 404 stands for “not found”.
Specifies an attribute of the error by name.
Specifies the details of an attribute as part from the error.
Credits Cost
| Blockchain | Credits for 1 result |
|---|---|
| Default cost | 120 |
| Solana | 120 |