near-ai-cloud
它能做什么
这项技能涵盖 NEAR AI Cloud,这是一项在安全硬件隔离环境中运行模型的私密 AI 服务。它说明如何通过兼容 OpenAI 的 API 调用该服务,以及如何检查硬件证明和消息签名,适合需要私密且可验证 AI 的开发者。
适用场景
- ✓当你需要 AI 回复,并且数据对基础设施提供商保持私密的时候。
- ✓当你想检查模型是否运行在安全硬件中的证明时。
- ✓当你想使用 NEAR AI Cloud 构建端到端加密聊天的时候。
技能链接
https://github.com/internet-court/internet-court-skill/blob/main/vendored/near/near-ai-cloud/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“我想在我的应用中使用 NEAR AI Cloud 获取私密的 AI 回复,并检查硬件证明是否有效。”
每周 5 个新技能,1 分钟读完。
工作原理
智能体会用你的 API 密钥,把兼容 OpenAI 的客户端指向 NEAR AI Cloud 地址,因此代码看起来与普通的 OpenAI 调用一样。它还可以验证安全硬件证明以及回复上的签名。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
NEAR AI Cloud
Verifiable private AI inference through Trusted Execution Environments (TEEs). All inference runs inside Intel TDX confidential VMs with NVIDIA TEE GPUs — your data stays encrypted and isolated from infrastructure providers, model providers, and NEAR itself.
Quick Start
The API is OpenAI-compatible. Point any OpenAI SDK at https://cloud-api.near.ai/v1:
import openai
client = openai.OpenAI(
base_url="https://cloud-api.near.ai/v1",
api_key="YOUR_API_KEY" # from cloud.near.ai dashboard
)
response = client.chat.completions.create(
model="deepseek-ai/DeepSeek-V3.1",
messages=[{"role": "user", "content": "Hello, NEAR AI!"}]
)
print(response.choices[0].message.content)
import OpenAI from 'openai';
const openai = new OpenAI({
baseURL: 'https://cloud-api.near.ai/v1',
apiKey: 'YOUR_API_KEY',
});
const completion = await openai.chat.completions.create({
model: 'deepseek-ai/DeepSeek-V3.1',
messages: [{ role: 'user', content: 'Hello, NEAR AI!' }]
});
console.log(completion.choices[0].message.content);
How It Works
- All inference runs inside Intel TDX confidential VMs with NVIDIA TEE GPUs
- TLS terminates inside the TEE, not at a load balancer — prompts are never exposed in plaintext
- TEEs generate cryptographic attestation proofs verifiable via NVIDIA NRAS and Intel TDX
- Every chat response is signed by a key that never leaves the TEE
- You can independently verify hardware attestation and bind it to message signatures
Verification Flow
1. Generate nonce
2. Request model attestation → get signing_address, nvidia_payload, intel_quote
3. Verify GPU attestation → submit nvidia_payload to NVIDIA NRAS, check JWT fields
4. Verify CPU attestation → verify intel_quote via dcap-qvl or TEE Explorer
5. Verify GPU-CPU binding → signing_address + nonce bound in TDX report data; same nonce in NRAS eat_nonce
6. Make chat request → use the API as normal
7. Fetch chat signature → GET /v1/signature/{chat_id}
8. Verify signature → recover signer, compare to attested signing_address
API Endpoints
Base URL: https://cloud-api.near.ai
| Endpoint | Method | Description |
|---|---|---|
/v1/chat/completions |
POST | OpenAI-compatible chat completions |
/v1/models |
GET | List available models |
/v1/attestation/report?model={model} |
GET | Model attestation (GPU + CPU) |
/v1/attestation/report |
GET | Gateway attestation |
/v1/signature/{chat_id} |
GET | Chat message signature |
Critical Knowledge
- Base URL is
https://cloud-api.near.ai/v1— use with any OpenAI SDK signing_algocan beecdsaored25519- Nonce should be a random 64-char hex string (32 bytes) for attestation freshness
- NRAS response is a two-part array:
[["JWT", "..."], {"GPU-0": "..."}]— overall JWT + per-GPU JWTs - The
signing_addressfrom model attestation must match the address that signed chat messages - Chat signatures are persistent and can be queried at any time after completion
References
| Topic | File |
|---|---|
| Private vs Anonymised Models | references/private-vs-anonymised.md |
| Model TEE verification | references/model-verification.md |
Planned:
- Gateway verification (TDX attestation for the API gateway + source provenance)
- Chat verification (request/response hashing + signature verification)
- E2E encrypted chat (ECDH key exchange, AES-256-GCM / ChaCha20-Poly1305)
- OpenAI compatibility (streaming, reasoning models, Files API)
Resources
- NEAR AI Cloud: https://cloud.near.ai
- Documentation: https://docs.near.ai/cloud/introduction
- Verification Example: https://github.com/near-examples/nearai-cloud-verification-example
- Full Verifier: https://github.com/nearai/nearai-cloud-verifier
- NVIDIA NRAS API: https://docs.api.nvidia.com/attestation/reference/attestmultigpu_1
- TEE Attestation Explorer: https://p
常见问题
使用 NEAR AI Cloud 需要重写我的应用吗?
通常不需要。该 API 兼容 OpenAI,因此 OpenAI SDK 可以直接指向 NEAR AI Cloud 地址。
谁能看到我的提示词?
该技能说明,提示词在安全环境中保持加密,不会以明文形式暴露给基础设施或模型提供商。
在哪里获取 API 密钥?
在 NEAR AI Cloud 控制台中获取。
详情
作者的原始描述
NEAR AI Cloud private inference and verification. Use when integrating NEAR AI Cloud API for verifiable private AI inference, verifying model or gateway TEE attestation (NVIDIA NRAS, Intel TDX), verifying chat message signatures, implementing end-to-end encrypted chat, or using the OpenAI-compatible API with NEAR AI Cloud.
热度
- GitHub 星标
- 7.0k
- 排名
- #13651
- 许可证
- —
- 更新时间
- 2026/10/26
评论
- …
同一仓库的更多技能
internet-court
7.0k帮你的智能体安全地向其他 AI 智能体或付费服务付款、雇用或进行交易,并指引它找到合适的专业指南。
genlayer-erc7710-connector
7.0k帮你的智能体把 AI 审核结果与权限系统连接起来,使不合格的审核可以限制或取消智能体的权限。
genlayer-intelligent-contracts
7.0k帮你的智能体定义 AI 裁判的规则、证据和输出,用于检查另一个智能体是否遵循了其授权范围。
x402-erc7710
7.0k帮你的智能体按次为网络服务付款,并设置在权限预算范围内的持续支出。