near-ai-cloud
できること
このスキルは、セキュアなハードウェアのエンクレーブの中でモデルを動かす、プライベートなAIサービスであるNEAR AI Cloudを扱います。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に貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“私のアプリでNEAR AI Cloudを使ってプライベートなAIの応答を得て、ハードウェアの証明が有効かを確認したいです。”
毎週5つの新しいスキル。1分で読めます。
仕組み
エージェントは、OpenAI互換のクライアントを、あなたのAPIキーを付けて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エージェントが、リクエストごとにウェブサービスの支払いを行い、許可された予算の範囲内で継続的な支出を設定できるよう支援します。
似ているスキル
api-connector-builder
280kエージェントが既存のパターンに従って、新しいAPI連携を構築します。新しい方式を作らずに、もう一つ連携を追加したいときに使います。
api-design
280kエージェントがベストプラクティスに沿ってREST APIを設計できるようにします。APIの通信方法、エラーの表示方法、データの整理方法を決めるのに役立ちます。
backend-patterns
280kエージェントのサーバーサイドのアーキテクチャパターンとデータベースの最適化を支援します。サーバー上で動くコードを作成またはレビューするときに役立ちます。