Endpoint format
Send a request
- curl
- Python
Routes
Each hostname exposes the routes its model supports:POST /v1/chat/completions: chat completionsPOST /v1/completions: text completionsPOST /v1/tokenize: tokenizationPOST /v1/embeddings: embeddingsPOST /v1/rerank: rerankingPOST /v1/score: scoringPOST /v1/images/generations: image generationPOST /v1/images/edits: image editingPOST /v1/audio/transcriptions: audio transcriptionPOST /v1/privacy/classify: privacy classification, on privacy-filter endpointsGET /v1/models: the model served by this hostnameGET /v1/attestation/report: attestation report for the instance that answersGET /v1/signature/{chat_id}: response signature, if the answering instance has it
Verify a direct endpoint
Direct verification is experimental. Each check applies only to the request or connection you inspect. It doesn’t establish evidence for later requests to the same hostname.Move to the Gateway
To switch an existing direct integration to the Gateway:- Change the base URL to
https://cloud-api.near.ai/v1. - Set
modelto the Gateway model ID fromGET https://cloud-api.near.ai/v1/model/list, for examplez-ai/glm-5.3-flash. - Keep your API key. It works on both.