Setup
- Create your account - Sign up at cloud.near.ai
- Add Credits - Go to the “Credits” section and purchase credits based on your needs
- Generate API Key - Go to the “API Keys” section and generate a new key
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 atcloud-api.near.ai.
Replace
YOUR_API_KEY with the API key you generated in the setup steps above.- curl
- Python
- JavaScript
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.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