> For the complete documentation index, see [llms.txt](https://docs.chainupcloud.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.chainupcloud.com/zhong-wen/qu-kuai-lian-api/filecoin/json-rpc-methods.md).

# JSON-RPC 方法

### Filecoin RPC

您可以在此处查看[**官方 Filecoin RPC 文档**](https://docs.filecoin.io/reference/json-rpc)**.**&#x20;

{% hint style="info" %}
由于某些 RPC 消耗的计算资源，免费公共 RPC 仅支持上述 RPC。其余 JSON-RPC 将被拦截并返回 403 状态代码。
{% endhint %}

{% hint style="info" %}
&#x20;我们仅收集用户 IP 地址以进行速率限制。有关更多信息，请访问：<https://www.chainup.com/privacyPolicy>
{% endhint %}

### &#x20;示例 RPC

{% tabs %}
{% tab title="Curl" %}

```
curl https://api.chainup.net/filecoin/mainnet/<YOUR_API_KEY> \
-X POST \
-H 'content-type: application/json' \
-H "CONSISTENT-HASH: true" \
--data '{"jsonrpc":"2.0","method":"Filecoin.Version","params":[],"id":1}'
```

{% endtab %}

{% tab title="Javascript" %}

```
const axios = require('axios');
//npm install axios if you don have the module installed

let options = {
url: "https://api.chainup.net/filecoin/mainnet/<YOUR_API_KEY>/rpc/v1",
method: "post",
headers:
{
"content-type": "application/json",
"CONSISTENT-HASH": "true"
},
body: JSON.stringify({"jsonrpc":"2.0","method":"Filecoin.Version","params":[],"id":1})
};

axios(options)
.then(response => {
console.log('Post successful: response:', response.data);
})
.catch(error => {
console.error('An error has occurred:', error);
});
```

{% endtab %}

{% tab title="Python" %}

````
```python
import requests
import json

headers = {"content-type": "application/json",
    "CONSISTENT-HASH": "true" }
payload = json.dumps({
    "id": 1,
    "jsonrpc": "2.0",
    "method": "Filecoin.Version",
    "params": []
})
r = requests.post(url="https://api.chainup.net/filecoin/mainnet/<YOUR_API_KEY>/rpc/v1", headers=headers, data=payload)
if r.status_code == 200:
    print("Post successful: response: ", r.content)
else:
    print("An error has occurred: ", r.status_code)
```
````

{% endtab %}
{% endtabs %}


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.chainupcloud.com/zhong-wen/qu-kuai-lian-api/filecoin/json-rpc-methods.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
