OpenAI-format API · NEAR AI TEE models
Private AI. Paid by Yield, from every chain.
Keep your principal. Its yield pays for your API calls.
001 Yield
Your deposit stays. Its yield pays.
- Deposit
- Yield
- Credits on NEAR
- API calls
- 01Principal is never spent as credits
- 02Spent ≤ realized yield, per user
- 03Principal + unspent + unrealized yield = position
- 04Withdraw principal any time, minus exit costs and pro-rata losses
002 Vaults
Four yield types. NEAR and EVM.
NEAR
-
01
Lending interest
Interest from lending USDC on
Rhea Lend.
Operator key · hackathon
Rhea USDC vault
EVM
-
02
Growing balance
The USDC balance on Aave itself grows.
Aave USDC vault
-
03
Uncapped appreciation
cbETH's rate to ETH grows from staking, with no ceiling.
cbETH vault
-
04
Capped appreciation
The PT rises to a fixed value at maturity.
Pendle PT-deJAAA vault
003 Private mode
Truly private AI. Ensured by TEE.
- Hardware attestationchecked by the SDK before it encrypts
- Signed replysigned inside, verified on your machine
Plain OpenAI clients work too: the relay then reads the prompt in transit, and the model still runs in the TEE.
004 API
One base URL. Any OpenAI client.
- Base URL
https://api.infernear.dev/v1- Models
GET /v1/models· NEAR AI TEE models, with prices- Keys
- Wallet-signed in the app · 30 days · revocable
curl https://api.infernear.dev/v1/chat/completions \
-H "Authorization: Bearer $INFERNEAR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model": "Qwen/Qwen3.8-27B", "max_tokens": 256,
"messages": [{"role": "user", "content": "Reply with the word ok."}]}'
import OpenAI from 'openai';
const client = new OpenAI({
baseURL: 'https://api.infernear.dev/v1',
apiKey: process.env.INFERNEAR_API_KEY, // inf_…
});
const completion = await client.chat.completions.create({
model: 'Qwen/Qwen3.8-27B',
messages: [{ role: 'user', content: 'Reply with the word ok.' }],
max_tokens: 256,
});
console.log(completion.choices[0].message.content);
import { InferenceClient, verifyDeploymentImageProvenance } from '@nearai/inference-sdk';
// "Verified" must mean NEAR's own gateway images, not just genuine TEE hardware.
const build = (repository, workflow = '.github/workflows/build.yml') => ({ repository, workflow });
const GATEWAY_IMAGES = {
'nearaidev/cloud-api': build('nearai/cloud-api'),
'nearaidev/cvm-ingress': build('nearai/cvm-ingress', '.github/workflows/build-push.yml'),
};
const client = new InferenceClient({
baseUrl: 'https://api.infernear.dev/v1',
apiKey: process.env.INFERNEAR_API_KEY, // inf_…
e2ee: true, // encrypt to the model's TEE key, here, before sending
gatewayVerification: {
verifiers: {
deployment: ({ appCompose }) =>
verifyDeploymentImageProvenance({ appCompose, imagePolicies: GATEWAY_IMAGES }),
},
},
});
const completion = await client.chat.completions.create({
model: 'Qwen/Qwen3.8-27B',
messages: [{ role: 'user', content: 'Reply with the word ok.' }],
max_tokens: 256,
});
// Check the model's signature over the exact request and reply bytes.
const receipt = await client.verifyResponse(completion.id);
console.log(`Verified ${receipt.signatureKind} reply:`, completion.choices[0].message.content);
Example request and response.
005 NEAR Intents
Any chain in. NEAR AI out.
NEAR Intents carries each vault's yield to NEAR, where it pays for NEAR AI. You never need a NEAR account, key or tokens.
Every chain's yield
- Aave USDC vault
- cbETH vault
- Pendle PT-deJAAA vault
principal stays yours
On NEAR
- Rhea USDC vault
- 01
USDC from any chain
Intents brings it to your own Base address, ready to deposit.
- 02
Signed with your EVM wallet
Deposits, exits and API keys. No NEAR account anywhere.
- 03
One credit balance
Yield from every vault, on Base or NEAR, pays for NEAR AI Cloud.
006 Proof
Check every contract.
- Every address on a public explorer
- Attestation and signatures, checked by NEAR AI's SDK
- Every call debited on NEAR, by inference ID
| Contract | Chain | Address | Admin |
|---|---|---|---|
| Credit ledger | NEAR | connector.infernear-ai.near |
None |
| Rhea USDC vault | NEAR | rhea.infernear-ai.near |
Operator key · hackathon |
| Aave USDC vault | Base | 0x19110449a361855d30090BC26112E9a5c3793198 |
None |
| cbETH vault | Base | 0x20B3852c32FFCBfD6a713045e7eA411683446f40 |
None |
| Pendle PT-deJAAA vault | Base | 0x5801707F6AF54f33Ab3E1910c09D79B81D4Be92c |
None |