Skip to main content
NEAR AI Cloud offers developers access to secure, private, verifiable AI models through a unified API. This quickstart guide will walk you through creating an account and making your first requests in minutes.

Setup

  1. Create your account - Sign up at cloud.near.ai
  2. Add Credits - Go to the “Credits” section and purchase credits based on your needs
  3. Generate API Key - Go to the “API Keys” section and generate a new key
Keep Your API Key SafeNever share your API key publicly or commit it to version control. If compromised, you can regenerate it anytime from your dashboard.

Make Your First API Call

NEAR AI Cloud uses an OpenAI-compatible API, making it easy to integrate with existing tools and libraries. Connect through the NEAR AI Cloud Gateway at cloud-api.near.ai.
Replace YOUR_API_KEY with the API key you generated in the setup steps above.
Request IDsGateway responses include an X-Request-Id response header. Support may ask you for it when debugging a request. The value is opaque support/debugging metadata, not W3C traceparent or distributed trace context. If you send your own X-Request-Id, use a non-sensitive UUID value; X-Request-Id values must not contain secrets or PII. X-Org-Id and X-Workspace-Id are internal tenant headers; public clients cannot set or override them.
The gateway routes your request to the appropriate model TEE:

Expected Response

The API will return a JSON response containing the model’s completion:
zai-org/GLM-5.1-FP8 is a reasoning model, so the response includes a reasoning_content field and the reasoning token count in usage.completion_tokens_details.reasoning_tokens (the top-level reasoning_tokens is a deprecated alias). See Reasoning Models to control this behavior.
All inference is performed within Trusted Execution Environments (TEEs), ensuring your data remains private and verifiable.
Using OpenAI SDKs?For streaming, async operations, and the stateless Responses API, see our comprehensive OpenAI Compatibility Guide.

Next Steps

Explore Models

Browse available AI models including GLM, Qwen, OpenAI, Anthropic, and Gemini

Private Inference

Learn about the secure architecture and how your data is protected

Verification

Understand how to verify and validate secure interactions with AI models

OpenAI Compatibility

Use standard OpenAI SDKs with streaming, async, and stateless Responses