> For the complete documentation index, see [llms.txt](https://connect.socios.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://connect.socios.com/partner-api/api-reference/nft-api/nft-api-endpoints.md).

# NFT API endpoints

The latest documentation for endpoints is always on the DevPortal: \
<https://partner.socios.com/devportal/apis/f59193f0-b4ea-4eb7-83f8-8b1f2858f181/test>

{% openapi src="/files/8sINXolbqj50hEwnOyj3" path="/user/nfts" method="get" %}
[NFT.json](https://31329255-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMDcaoJLMj5Y3jzFMTONF%2Fuploads%2Fsk2wL96s6pcBscmiMgAX%2FNFT.json?alt=media\&token=b5e9cb25-8dc7-4753-8945-2d2178c4fa0c)
{% endopenapi %}

{% hint style="success" %}
:arrow\_down: **ALTERNATIVE: Retrieve User NFT Balance** :arrow\_down:\
The following code will allow you to check how many NFT from a specific collection a user holds.&#x20;
{% endhint %}

<pre class="language-javascript" data-overflow="wrap" data-line-numbers><code class="lang-javascript"><strong>import { abi as erc721ABI } from './ERC721ABI.json';
</strong>async function getNFTBalance() {
  const balance = await client.readContract({
    address: '0xYourNFTAddress', // Replace with the actual NFT contract address
    abi: erc721ABI, // ERC-721 ABI
    functionName: 'balanceOf', // Standard ERC-721 function to get balance
    args: ['0xUserWalletAddress'], // User's address whose NFT balance you want to check
  });
  return balance.toString();
}

// Example usage
getNFTBalance().then(console.log);

</code></pre>

{% openapi src="/files/8sINXolbqj50hEwnOyj3" path="/nft/{id}" method="get" %}
[NFT.json](https://31329255-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMDcaoJLMj5Y3jzFMTONF%2Fuploads%2Fsk2wL96s6pcBscmiMgAX%2FNFT.json?alt=media\&token=b5e9cb25-8dc7-4753-8945-2d2178c4fa0c)
{% endopenapi %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://connect.socios.com/partner-api/api-reference/nft-api/nft-api-endpoints.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
