diff --git a/English/SUMMARY.md b/English/SUMMARY.md index 5fe3ad88..0fead43d 100644 --- a/English/SUMMARY.md +++ b/English/SUMMARY.md @@ -767,7 +767,7 @@ * [GLM-5.2](ai-stack/model-as-a-service/models/z-ai/glm-5.2-thirdparty.md) * [GLM-5.3](ai-stack/model-as-a-service/models/z-ai/glm-5.3.md) * [GLM-5.3 Flash](ai-stack/model-as-a-service/models/z-ai/glm-5.3-flash.md) - * [GLM-5.3 Flash Thirdparty](ai-stack/model-as-a-service/models/z-ai/glm-5.3-flash-thirdparty.md) + * [GLM-5.3 Flash Third-party](ai-stack/model-as-a-service/models/z-ai/glm-5.3-flash-thirdparty.md) * [BGE-M3](ai-stack/model-as-a-service/models/baai/bge-m3.md) * [Qwen 3 Embedding 8B](ai-stack/model-as-a-service/models/qwen/qwen3-embedding-8b.md) * [BGE Reranker v2 m3](ai-stack/model-as-a-service/models/baai/bge-reranker-v2-m3.md) @@ -782,6 +782,7 @@ * [Quickstart](ai-stack/model-as-a-service/get-started/quickstart.md) * [FAQ](ai-stack/model-as-a-service/get-started/faq.md) * [Portal](ai-stack/model-as-a-service/portal/README.md) + * [Models and Model detail pages](ai-stack/model-as-a-service/portal/models.md) * [API keys](ai-stack/model-as-a-service/portal/api-keys.md) * [Enable / disable models](ai-stack/model-as-a-service/portal/enable-models.md) * [Rate limits](ai-stack/model-as-a-service/portal/rate-limits.md) @@ -792,6 +793,7 @@ * [Responses](ai-stack/model-as-a-service/api-reference/responses.md) * [Embeddings](ai-stack/model-as-a-service/api-reference/embeddings.md) * [Rerank](ai-stack/model-as-a-service/api-reference/rerank.md) + * [Models](ai-stack/model-as-a-service/api-reference/models.md) * [OCR API](ai-stack/model-as-a-service/api-reference/ocr.md) * [Streaming](ai-stack/model-as-a-service/api-reference/streaming.md) * [Parameters](ai-stack/model-as-a-service/api-reference/parameters.md) diff --git a/English/ai-stack/model-as-a-service/README.md b/English/ai-stack/model-as-a-service/README.md index 3343bd56..4c298996 100644 --- a/English/ai-stack/model-as-a-service/README.md +++ b/English/ai-stack/model-as-a-service/README.md @@ -6,33 +6,18 @@ description: >- # Model as a Service (MaaS) -Access the [Models ](https://aiplatform.console.greennode.ai/models)section in AI Platform: +Access the [Models ](https://aiplatform.console.greennode.ai/models)section in AI Platform. Your balance is shown at the top in **credits** (`1 credit = 1 VND`). * To use and enable any model, you need an API key. [See more details](../ai-platform/getting-started-with-ai-platform.md). -You can filter models using the options on the left sidebar: - -* Provider: Google, Anthropic, OpenAI, GreenNode, ... -* Model Type: - * Chat: Designed for interactive conversations. Called through Chat Completions, Messages (Anthropic) or Responses, depending on the model. - * Embedding: Converts data (text, images, audio, etc.) into high-dimensional vectors, allowing machines to understand and compare semantics for search, classification, or recommendation. - * Rerank: Reorders a list of documents by relevance to a query. - * OCR: Extracts text and data from images and documents. -* Use Case:: - * Vietnamese: Optimized for Vietnamese language tasks. - * General Tasks: Suitable for a wide range of general-purpose tasks. - * Translation: Specialized for translation tasks. - * Research: Supports research-related tasks. - * Finance: Focused on financial domain applications. - * Marketing: Optimized for marketing use cases. - * Technology: Designed for technology-related tasks. +You can filter and sort models right on the Models page: **Context length**, **Hosting mode**, **API compatibility**, **Input modality**, **Provider**, plus **Sort by** and **Search models by name**. See [Models and Model detail pages](portal/models.md) for each filter, the model card and the detail page. ### Enable / Disable Models -1. Click the "Toggle models" button. Users must activate billing to enable models. For Prepaid users, quota must be added before enabling models, while Postpaid users can enable and use models immediately. Refer to [pricing details](pricing.md).\ +1. Click the **Enable / disable models** button. Users must activate billing to enable models. For Prepaid users, quota must be added before enabling models, while Postpaid users can enable and use models immediately. Refer to [pricing details](pricing.md).\ ![](<../../.gitbook/assets/image (390).png>) 2. Model Selection: A popup window will appear, allowing you to search and filter models by Provider, Status, or Type. -3. Enable/disable models individually or in bulk. +3. Enable/disable models individually or in bulk. You can also flip the switch on the right of a model card. 4. Save your changes.
diff --git a/English/ai-stack/model-as-a-service/api-reference/README.md b/English/ai-stack/model-as-a-service/api-reference/README.md index eb7ddd74..789f4ff3 100644 --- a/English/ai-stack/model-as-a-service/api-reference/README.md +++ b/English/ai-stack/model-as-a-service/api-reference/README.md @@ -8,6 +8,7 @@ Pages in this section: * [Responses](responses.md) * [Embeddings](embeddings.md) * [Rerank](rerank.md) +* [Models](models.md) * [OCR API](ocr.md) * [Streaming](streaming.md) * [Parameters](parameters.md) diff --git a/English/ai-stack/model-as-a-service/api-reference/errors.md b/English/ai-stack/model-as-a-service/api-reference/errors.md index cca8cca2..bccae411 100644 --- a/English/ai-stack/model-as-a-service/api-reference/errors.md +++ b/English/ai-stack/model-as-a-service/api-reference/errors.md @@ -10,6 +10,7 @@ description: "Errors produced by the gateway carry a machine-readable code in th | --- | --- | --- | --- | | `invalid_request` | 400 | No prompt (`messages` missing or empty — message "request body doesn't contain valid prompts"), unsupported parameter or value, `max_tokens` too large, unsupported content type. | No — fix the request | | `request_denied` | 401 | API key missing, unknown, inactive or expired. | No | +| `invalid_api_key` | 401 | Missing or invalid API key on `/v1/models` — the model catalog endpoint. | No | | `request_denied` | 403 | The model is not enabled for the account (“model not allowed for this key”). | No — enable the model | | `request_denied` | 400 | A content-safety guardrail blocked the request. See [Content safety](../features/content-safety.md). | No | | `request_denied` | 429 | Your rate limit is exceeded. The message names the limit and the seconds until it resets. See [Rate limits & limits](limits.md). | Yes, after the reset | diff --git a/English/ai-stack/model-as-a-service/api-reference/messages.md b/English/ai-stack/model-as-a-service/api-reference/messages.md index 1028e9f3..c9bdbf60 100644 --- a/English/ai-stack/model-as-a-service/api-reference/messages.md +++ b/English/ai-stack/model-as-a-service/api-reference/messages.md @@ -30,9 +30,7 @@ description: "Anthropic-compatible Messages API, available on every chat model. | `tool_choice` | object | Optional | auto · any · tool · none | auto | Anthropic tool-choice format. | {% hint style="info" %} -**About ranges and defaults** - -Ranges follow the API specification the endpoint is compatible with. Whether a given model accepts a parameter is listed in its `supported_parameters` (`GET /v1/models`); a parameter not on that list is ignored (no error). See [Parameters](parameters.md) for how many models support each one. +Ranges follow the API specification the endpoint is compatible with; a parameter the model does not accept is ignored (no error). See [Parameters](parameters.md). {% endhint %} ## Example diff --git a/English/ai-stack/model-as-a-service/api-reference/models.md b/English/ai-stack/model-as-a-service/api-reference/models.md new file mode 100644 index 00000000..038e13e3 --- /dev/null +++ b/English/ai-stack/model-as-a-service/api-reference/models.md @@ -0,0 +1,104 @@ +--- +description: "Read the model catalog that your API key can use, with full OpenAI/OpenRouter-compatible metadata — context length, modality, pricing and supported parameters." +--- + +# Models + +`GET /v1/models` returns the models your API key can use. `GET /v1/models/{id}` returns one model. The metadata follows the OpenAI/OpenRouter schema, so existing tools, SDKs and price-comparison scripts can read it without manually checking the docs. + +## Endpoints + +| Method | Path | Returns | +| --- | --- | --- | +| `GET` | `/v1/models` | The models your key can use | +| `GET` | `/v1/models/{id}` | One model; `id` has the form `vendor/model`, for example `z-ai/glm-5.3` | +| `HEAD` | `/v1/models/{id}` | `200` if the model exists, with no body | + +Send the API key as on every other endpoint — see [Authentication](overview.md#authentication). The list only contains models your key can use: models that are not enabled, or that belong to an expired package / sub-key, do not appear. + +## Query parameter + +| Parameter | Value | Description | +| --- | --- | --- | +| `view` | `basic` | Each item only has the 6 fields of the legacy shape (`id`, `object`, `created`, `owned_by`…), without `pricing`, `architecture` or `supported_parameters`. Kept unchanged so existing code does not break. | + +## Fields of a model + +| Field | Type | Description | +| --- | --- | --- | +| `id` | string | Model ID in the form `vendor/model`; use it as the `model` value when calling the API. | +| `object` | string | Object type, always `model`. | +| `created` | integer | When the model was added to the catalog (Unix timestamp). | +| `description` | string | Model description. | +| `context_length` | integer | Maximum tokens for input + output. | +| `architecture.modality` | string | Data direction, for example `text->text`, `text+image->text`. | +| `architecture.tokenizer` | string | Tokenizer used to count tokens. | +| `pricing.prompt` | number | Price per input token, in credits. | +| `pricing.completion` | number | Price per output token, in credits. | +| `pricing.cache` | number | Price per cache token, in credits. | +| `supported_parameters` | array | Parameters the model accepts, for example `temperature`, `tools`, `reasoning_effort`. Always an array, never `null`. | +| `top_provider.max_completion_tokens` | integer | Maximum output tokens. | +| `top_provider.is_moderated` | boolean | Whether the model goes through content moderation. | +| `reasoning.mandatory` | boolean | `true` = the model always reasons; it cannot be turned off. | +| `reasoning.default_enabled` | boolean | `true` = the model reasons when you pass nothing. | +| `reasoning.default_effort` | string | Effort level applied when you pass nothing. | +| `reasoning.supported_efforts` | array | `reasoning_effort` levels the model accepts. | +| `per_request_limits` | object | Per-model request limits (for example RPM) so clients can throttle before hitting a 429. | + +`pricing` is the price **per token**. To get the familiar unit **credits / 1,000,000 tokens**, multiply the value by `1,000,000`. `1 credit = 1 VND`. + +## Examples + +List models: + +```bash +curl https://maas-llm-aiplatform-hcm.api.vngcloud.vn/v1/models \ + -H "Authorization: Bearer $GREENNODE_API_KEY" +``` + +```json +{ + "object": "list", + "data": [ + { + "id": "z-ai/glm-5.3", + "object": "model", + "created": 1751328000, + "description": "GLM-5.3 is Z.ai's open-weight flagship model ...", + "context_length": 1000000, + "architecture": { "modality": "text->text", "tokenizer": "glm" }, + "pricing": { "prompt": 0.0000371, "completion": 0.0001166, "cache": 0.00000689 }, + "supported_parameters": ["temperature", "tools", "reasoning_effort"], + "top_provider": { "max_completion_tokens": 131072, "is_moderated": false }, + "reasoning": { + "mandatory": true, + "default_enabled": true, + "default_effort": "max", + "supported_efforts": ["minimal", "low", "medium", "high", "xhigh", "max"] + } + } + ] +} +``` + +Get one model: + +```bash +curl https://maas-llm-aiplatform-hcm.api.vngcloud.vn/v1/models/z-ai/glm-5.3 \ + -H "Authorization: Bearer $GREENNODE_API_KEY" +``` + +The response is a single model object (not wrapped in `data`), with the same schema as an item above. + +{% hint style="info" %} +`GET /v1/models` is the source to build against. The [Model list](../models/README.md) page is a human-readable view of the same catalog. +{% endhint %} + +## Errors + +| HTTP | Code | When | +| --- | --- | --- | +| `401` | `invalid_api_key` | The API key is missing or invalid. | +| `404` | `model_not_found` | The `id` does not exist, or you do not have access to that model. | + +A `401` on generation endpoints (`/v1/chat/completions`, `/v1/messages`, `/v1/responses`) uses `request_denied`; `/v1/models` uses `invalid_api_key`. See [Errors](errors.md). diff --git a/English/ai-stack/model-as-a-service/api-reference/overview.md b/English/ai-stack/model-as-a-service/api-reference/overview.md index 8b7551a4..9832a2b5 100644 --- a/English/ai-stack/model-as-a-service/api-reference/overview.md +++ b/English/ai-stack/model-as-a-service/api-reference/overview.md @@ -19,7 +19,8 @@ https://maas-llm-aiplatform-hcm.api.vngcloud.vn | [`POST /v1/responses`](responses.md) | OpenAI Responses | ✓ | | [`POST /v1/embeddings`](embeddings.md) | OpenAI Embeddings | — | | [`POST /v1/rerank`](rerank.md) | Rerank (`query` + `documents`) | — | -| [`GET /v1/models`](../models/README.md) | Model catalog | — | +| [`GET /v1/models`](models.md) | Model catalog (OpenAI/OpenRouter) | — | +| [`GET /v1/models/{id}`](models.md) | One model | — | ## Authentication @@ -30,7 +31,7 @@ Send your API key in one of these two headers: | `Authorization: Bearer ` | OpenAI SDK, curl | | `x-api-key: ` | Anthropic SDK, Claude Code | -Missing or unknown key → **401** `request_denied`. Model not enabled for the key → **403** `request_denied`. +Missing or unknown key → **401** `request_denied`. Model not enabled for the key → **403** `request_denied`. `/v1/models` alone returns **401** `invalid_api_key` for a missing or invalid key. See [Errors](errors.md). ## Selecting the model diff --git a/English/ai-stack/model-as-a-service/api-reference/parameters.md b/English/ai-stack/model-as-a-service/api-reference/parameters.md index 852d207f..9e9d233c 100644 --- a/English/ai-stack/model-as-a-service/api-reference/parameters.md +++ b/English/ai-stack/model-as-a-service/api-reference/parameters.md @@ -21,7 +21,7 @@ description: "The same concept has a different field name on each endpoint. This | Stop reason | `finish_reason` | `stop_reason` | `status` | {% hint style="info" %} -Not every model supports every parameter. Check `supported_parameters` in [`GET /v1/models`](../models/README.md). `top_k`, `min_p` and `repetition_penalty` are accepted only by models that list them. +Not every model supports every parameter. Check `supported_parameters` in [`GET /v1/models`](models.md). `top_k`, `min_p` and `repetition_penalty` are accepted only by models that list them. {% endhint %} ## Parameter support by model diff --git a/English/ai-stack/model-as-a-service/api-reference/responses.md b/English/ai-stack/model-as-a-service/api-reference/responses.md index c6b9868c..03ebb881 100644 --- a/English/ai-stack/model-as-a-service/api-reference/responses.md +++ b/English/ai-stack/model-as-a-service/api-reference/responses.md @@ -30,9 +30,7 @@ description: "OpenAI Responses API, available on every chat model. Used by Codex | `previous_response_id` | string | Optional | — | — | **Not supported.** The gateway is stateless; send the full conversation in `input` every turn. | {% hint style="info" %} -**About ranges and defaults** - -Ranges follow the API specification the endpoint is compatible with. Whether a given model accepts a parameter is listed in its `supported_parameters` (`GET /v1/models`); a parameter not on that list is ignored (no error). See [Parameters](parameters.md) for how many models support each one. +Ranges follow the API specification the endpoint is compatible with; a parameter the model does not accept is ignored (no error). See [Parameters](parameters.md). {% endhint %} {% hint style="info" %} diff --git a/English/ai-stack/model-as-a-service/available-models.md b/English/ai-stack/model-as-a-service/available-models.md index f1f27371..117a29a4 100644 --- a/English/ai-stack/model-as-a-service/available-models.md +++ b/English/ai-stack/model-as-a-service/available-models.md @@ -6,20 +6,9 @@ The MaaS API provides access to model families such as Qwen, DeepSeek, GLM, Kimi The model catalog below covers models self-hosted by GreenNode and third-party models under official contracts. See catalog changes in [Release Notes](../release-notes.md) and the billing rules in [Pricing](pricing.md). {% endhint %} -### Rate limit +### Rate limits -Applies by default to **every new account** using the MaaS API, counted **separately for each model**: - -| Limit | Default value (per model) | -| --- | --- | -| Requests | **10 RPM** — 10 requests/minute | -| Tokens | **1,000,000 TPM** — 1 million tokens/minute | - -Each model has its own counter: calling model A does not consume the quota of model B. See [Rate limits](portal/rate-limits.md) for details. - -{% hint style="info" %} -Need more? [Contact GreenNode](https://helpdesk.greennode.ai/portal/en/newticket) to be considered for the **whitelist**. Whitelisting is reviewed case by case. -{% endhint %} +**10 RPM** and **1,000,000 TPM** per model by default, counted separately per model. See [Rate limits](portal/rate-limits.md) for details and how to request more. *** @@ -34,4 +23,4 @@ Models are offered in one of two ways: Under the [SLA](sla.md), the commitment on Monthly Uptime Percentage applies to the availability of the Service for GreenNode Models; GreenNode does not commit to any SLA for Third-party Models. The list of available models and their classification are published and updated by GreenNode on the [Service Console](https://aiplatform.console.greennode.ai/models). -MaaS supports these model types: **Chat**, **Embedding**, **Rerank** and **OCR**. +MaaS supports these model types: **Chat**, **Embedding**, **Rerank** and **OCR**. Chat models can be called through one or more API standards: **Chat Completions**, **Messages** (Anthropic) and **Responses** — see the `API compatibility` row on a Model detail page. diff --git a/English/ai-stack/model-as-a-service/features/reasoning.md b/English/ai-stack/model-as-a-service/features/reasoning.md index e187340f..52a1be34 100644 --- a/English/ai-stack/model-as-a-service/features/reasoning.md +++ b/English/ai-stack/model-as-a-service/features/reasoning.md @@ -24,7 +24,7 @@ The **Reasoning** column of the [Model list](../models/README.md) has three valu Accepted values: `none` · `minimal` · `low` · `medium` · `high` · `xhigh` · `max`. Any other value → 400. -* Each model supports a subset (see `reasoning.supported_efforts` on the [Models](../models/README.md) page). A value the model doesn't support natively is mapped to the closest level it does. +* Each model supports a subset (see `reasoning.supported_efforts` in the [Models API](../api-reference/models.md)). A value the model doesn't support natively is mapped to the closest level it does. * If you don't set an effort, the model's `default_effort` applies — for several models that is `max`, which is slow and token-hungry. * Models with `reasoning.mandatory: true` always reason; `none` lowers effort to the minimum rather than disabling it. diff --git a/English/ai-stack/model-as-a-service/maas-api.md b/English/ai-stack/model-as-a-service/maas-api.md index c3e5828c..f043c8f3 100644 --- a/English/ai-stack/model-as-a-service/maas-api.md +++ b/English/ai-stack/model-as-a-service/maas-api.md @@ -1,144 +1,23 @@ # MaaS API -**MaaS** provides an **OpenAI-compatible** API for seamless model inference. You can integrate easily using the **Python or JavaScript SDK**, or directly from your **terminal with cURL**. +**MaaS** provides an **OpenAI- and Anthropic-compatible** API for calling models. You can integrate with the **Python / JavaScript SDK**, or directly from your **terminal with cURL**. -## 1. OpenAI-compatible API (Chat, Completion, Embedding, Image Generation) +## 1. API Usage — three call styles -Refer to the scripts under API Usage on the Portal. +The Model detail page on the Portal has an **API Usage** tab with ready-to-run code for all three call styles in three languages: -_Curl_ +| Call style | Endpoint | Use it for | +| --- | --- | --- | +| Chat | `POST /v1/chat/completions` | OpenAI SDK, most clients | +| Messages | `POST /v1/messages` | Anthropic SDK, Claude Code | +| Responses | `POST /v1/responses` | Newer OpenAI SDK, Codex CLI | -
+Each call style ships **cURL**, **Python** and **Node.js** samples; click **COPY**, replace the API key and run. -_Python_ - -
- -Javascript - -
+Per-endpoint details: [Chat Completions](api-reference/chat-completions.md) · [Messages](api-reference/messages.md) · [Responses](api-reference/responses.md). Base URL and authentication: [API overview](api-reference/overview.md). Model catalog: [Models API](api-reference/models.md). *** ## 2. OCR API -OCR is one of the model types available in MaaS. Because it works on documents (file upload, asynchronous processing), it exposes its own set of endpoints instead of the OpenAI-compatible endpoint above. This section explains how to call the OCR API. - -### Submit OCR (upload file to create a request) - -* **Method**: `POST` -* **URL**: `https://maas-llm-aiplatform-hcm.api.vngcloud.vn/maas/user-/greennode/idp/v1/ocr/ingest` -* **Headers**: - * `Authorization: Bearer ` - * `portal-user-id: ` (optional — the gateway sets it from the API key; if sent it must match the user ID in the URL) -* **Body**: `multipart/form-data` - * `flow` (required) - * `single`: OCR for a single document - * or ``: OCR for a document workflow (if provided) - * `doc_type` (required if `flow=single`): ``, e.g. `Doc2Text` (general text OCR). Contact GreenNode for other document types - * `file_type` (required): `PDF` or `IMAGE` - * `file` (required): file to be processed by OCR. `PDF`: one `.pdf` file, 2 KB–50 MB. `IMAGE`: jpg, jpeg, png, bmp, tif, tiff, 2 KB–10 MB each; multiple files allowed - -#### Example - -```bash -curl --location 'https://maas-llm-aiplatform-hcm.api.vngcloud.vn/maas/user-/greennode/idp/v1/ocr/ingest' \ - --header 'Authorization: Bearer ' \ - --header 'portal-user-id: ' \ - --form 'flow="single"' \ - --form 'doc_type=""' \ - --form 'file_type="PDF"' \ - --form 'file=@""' -``` - -Success returns **201**; the response includes: - -* `data.request_id`: used to retrieve results -* `data.file_ids`: used to download result images - -### Get OCR Result (use `request_id` to retrieve text/data) - -* **Method**: `GET` -* **URL**: `https://maas-llm-aiplatform-hcm.api.vngcloud.vn/maas/user-/greennode/idp/v1/ocr/ingest/` -* **Headers**: - * `Authorization: Bearer ` - * `portal-user-id: ` - -#### Example - -```bash -curl --location 'https://maas-llm-aiplatform-hcm.api.vngcloud.vn/maas/user-/greennode/idp/v1/ocr/ingest/' \ - --header 'Authorization: Bearer ' \ - --header 'portal-user-id: ' -``` - -#### What if no data is returned yet? - -This is normal because OCR processing is still in progress. - -* Wait 2–5 seconds and call the API again (polling) until `data.status` is `COMPLETED` (success) or `FAILED` (processing failed; stop polling). -* If the timeout is exceeded and no data is returned, send the `request_id` to the support team for investigation. - -### Additional OCR Data APIs (optional, depending on needs) - -#### Get Table Data (TABLE) - -* **Method**: `GET` -* **URL**: `https://maas-llm-aiplatform-hcm.api.vngcloud.vn/maas/user-/greennode/idp/v1/ocr/ingest/table//` - -```bash -curl --location 'https://maas-llm-aiplatform-hcm.api.vngcloud.vn/maas/user-/greennode/idp/v1/ocr/ingest/table//' \ - --header 'Authorization: Bearer ' \ - --header 'portal-user-id: ' -``` - -#### Get Signature Results - -* **Method**: `GET` -* **URL**: `https://maas-llm-aiplatform-hcm.api.vngcloud.vn/maas/user-/greennode/idp/v1/ocr/ingest/signature//` - -```bash -curl --location 'https://maas-llm-aiplatform-hcm.api.vngcloud.vn/maas/user-/greennode/idp/v1/ocr/ingest/signature//' \ - --header 'Authorization: Bearer ' \ - --header 'portal-user-id: ' -``` - -Note: document\_id is `data.documents[].document_id` in the Get OCR Result response. - -#### Get Stamp Results - -* **Method**: `GET` -* **URL**: `https://maas-llm-aiplatform-hcm.api.vngcloud.vn/maas/user-/greennode/idp/v1/ocr/ingest/stamp//` - -```bash -curl --location 'https://maas-llm-aiplatform-hcm.api.vngcloud.vn/maas/user-/greennode/idp/v1/ocr/ingest/stamp//' \ - --header 'Authorization: Bearer ' \ - --header 'portal-user-id: ' -``` - -#### Download Result Images - -* **Method**: `GET` -* **URL**: `https://maas-llm-aiplatform-hcm.api.vngcloud.vn/maas/user-/greennode/idp/v1/ocr/ingest/file//` - -```bash -curl --location 'https://maas-llm-aiplatform-hcm.api.vngcloud.vn/maas/user-/greennode/idp/v1/ocr/ingest/file//' \ - --header 'Authorization: Bearer ' \ - --header 'portal-user-id: ' -``` - -### Quick Troubleshooting for OCR - -* `401 Unauthorized`: - * Missing `Authorization` (`missing api key`) or invalid API key (`unknown api key`). -* `403 Forbidden`: - * The user ID in the path differs from the owner of the API key (`tenant mismatch`). -* `400 Bad Request`: - * `doc_type` missing when `flow=single`, `file_type` missing, `file` missing, or an invalid file type / size. -* `404 Not Found`: - * The `request_id` does not exist. -* `500`: - * `Multipart field value cannot be null`: the `flow` field is missing. - * `Doc Type not found`: the `doc_type` does not exist. -* Polling does not return results: - * Provide `request_id` + timestamp + sample file (if possible) to the support team for further investigation. +The OCR model (`greennode/idp`) accepts files and returns results asynchronously, so it uses its own set of endpoints and does not take `model` in the body. See [OCR API](api-reference/ocr.md) for headers, upload fields, polling and the result endpoints. diff --git a/English/ai-stack/model-as-a-service/model-pricing-list.md b/English/ai-stack/model-as-a-service/model-pricing-list.md index 251ddc6f..887e1499 100644 --- a/English/ai-stack/model-as-a-service/model-pricing-list.md +++ b/English/ai-stack/model-as-a-service/model-pricing-list.md @@ -12,9 +12,9 @@ Current pricing for models on GreenNode MaaS. Catalog and price changes are reco ### 1. Token-based Models -Unit: **VND / 1,000,000 tokens**. See how the pricing formula is applied in [Pricing](pricing.md). +Unit: **credits / 1,000,000 tokens** (`1 credit = 1 VND`). See how the pricing formula is applied in [Pricing](pricing.md). -| Model | Type | Price (VND) | +| Model | Type | Price (credits) | | ------------------------ | ------ | ----------: | | DeepSeek V4.1 Flash | Input | 8,507 | | DeepSeek V4.1 Flash | Output | 34,026 | @@ -37,9 +37,9 @@ Unit: **VND / 1,000,000 tokens**. See how the pricing formula is applied in [Pri | GLM-5.3 Flash | Input | 4,253 | | GLM-5.3 Flash | Output | 14,178 | | GLM-5.3 Flash | Cache | 851 | -| GLM-5.3 Flash Thirdparty | Input | 4,253 | -| GLM-5.3 Flash Thirdparty | Output | 14,178 | -| GLM-5.3 Flash Thirdparty | Cache | 851 | +| GLM-5.3 Flash Third-party | Input | 4,253 | +| GLM-5.3 Flash Third-party | Output | 14,178 | +| GLM-5.3 Flash Third-party | Cache | 851 | | Kimi K2.7 Code | Input | 26,937 | | Kimi K2.7 Code | Output | 113,420 | | Kimi K2.7 Code | Cache | 5,387 | @@ -70,7 +70,7 @@ Unit: **VND / 1,000,000 tokens**. See how the pricing formula is applied in [Pri ### 2. Embedding, Rerank & OCR Models -| Model | Type | Price (VND) | +| Model | Type | Price (credits) | | ------------------- | ------ | ----------------: | | BGE Reranker v2 m3 | Input | 265 | | BGE-M3 | Input | 2,836 | diff --git a/English/ai-stack/model-as-a-service/models/README.md b/English/ai-stack/model-as-a-service/models/README.md index cb8d37a2..746d4350 100644 --- a/English/ai-stack/model-as-a-service/models/README.md +++ b/English/ai-stack/model-as-a-service/models/README.md @@ -28,7 +28,7 @@ Every model is addressed as `vendor/model`. Click a model for details and a read | [`z-ai/glm-5.2-thirdparty`](z-ai/glm-5.2-thirdparty.md) | GLM-5.2 | 1M | 128K | text | chat, responses, messages | On by default | | [`z-ai/glm-5.3`](z-ai/glm-5.3.md) | GLM-5.3 | 1M | 128K | text | chat, responses, messages | Always on | | [`z-ai/glm-5.3-flash`](z-ai/glm-5.3-flash.md) | GLM-5.3 Flash | 1M | 128K | text, image, video | chat, responses, messages | Always on | -| [`z-ai/glm-5.3-flash-thirdparty`](z-ai/glm-5.3-flash-thirdparty.md) | GLM-5.3 Flash Thirdparty | 1M | 128K | text, image, video | chat, responses, messages | Always on | +| [`z-ai/glm-5.3-flash-thirdparty`](z-ai/glm-5.3-flash-thirdparty.md) | GLM-5.3 Flash Third-party | 1M | 128K | text, image, video | chat, responses, messages | Always on | ## Embedding diff --git a/English/ai-stack/model-as-a-service/models/z-ai/glm-5.3-flash-thirdparty.md b/English/ai-stack/model-as-a-service/models/z-ai/glm-5.3-flash-thirdparty.md index 5e3703cd..f1e1f3dd 100644 --- a/English/ai-stack/model-as-a-service/models/z-ai/glm-5.3-flash-thirdparty.md +++ b/English/ai-stack/model-as-a-service/models/z-ai/glm-5.3-flash-thirdparty.md @@ -1,4 +1,4 @@ -# GLM-5.3 Flash Thirdparty +# GLM-5.3 Flash Third-party Model ID: `z-ai/glm-5.3-flash-thirdparty` · Type: Chat diff --git a/English/ai-stack/model-as-a-service/playground.md b/English/ai-stack/model-as-a-service/playground.md index 99b9188f..951dd5a4 100644 --- a/English/ai-stack/model-as-a-service/playground.md +++ b/English/ai-stack/model-as-a-service/playground.md @@ -9,6 +9,8 @@ description: >- ### Access [Playground](https://aiplatform.console.greennode.ai/playground) +From the [Models](portal/models.md) page, click **Go to Playground**. From a Model detail page, click **Try Playground** to open the Playground with that exact model and variant. + ### Model Testing Guide 1. Select the model type based on your task: Chat, Embedding, Rerank, OCR diff --git a/English/ai-stack/model-as-a-service/portal/README.md b/English/ai-stack/model-as-a-service/portal/README.md index 7e88aa37..1f5e3cea 100644 --- a/English/ai-stack/model-as-a-service/portal/README.md +++ b/English/ai-stack/model-as-a-service/portal/README.md @@ -2,6 +2,7 @@ Pages in this section: +* [Models and Model detail pages](models.md) * [API keys](api-keys.md) * [Enable / disable models](enable-models.md) * [Rate limits](rate-limits.md) diff --git a/English/ai-stack/model-as-a-service/portal/enable-models.md b/English/ai-stack/model-as-a-service/portal/enable-models.md index 774835b6..34ad5351 100644 --- a/English/ai-stack/model-as-a-service/portal/enable-models.md +++ b/English/ai-stack/model-as-a-service/portal/enable-models.md @@ -15,19 +15,17 @@ description: "A model must be enabled for your account before your API keys can ## Enable or disable 1. Open [Models](https://aiplatform.console.greennode.ai/models) in AI Platform. -2. Click **Toggle models**. A popup lists the models; search or filter by Provider, Status or Type. +2. Click **Enable / disable models**. A popup lists the models; search or filter by Provider, Status or Type. 3. Switch models on or off, one by one or in bulk. 4. Save your changes. -## Find a model +## Enable or disable on the card -The Models page has filters in the left sidebar: +Besides the popup, each model card on the [Models](models.md) page has its own switch. A model with several variants has one switch per variant; the `1/2 ENABLED` badge shows how many variants are enabled. -| Filter | Values | -| --- | --- | -| Provider | BAAI, DeepSeek, Google, GreenNode, Kimi, Minimax, Qwen, Z.ai | -| Model Type | Chat, Messages, Responses, Embedding, Rerank, OCR | -| Use case | Vietnamese, General Tasks, Translation, Research, Finance, Marketing, Technology | +## Find a model + +The Models page has filters in the left sidebar (Context length, Hosting mode, API compatibility, Input modality, Provider) and **Sort by**. See [Models and Model detail pages](models.md) for each filter. ## Model status @@ -49,8 +47,8 @@ The Models page has filters in the left sidebar: A model is either hosted on GreenNode infrastructure (**GreenNode self-host**) or forwarded to the model vendor under an official contract (**Third-party**). Some model families are offered both ways; the partner variant has an ID ending in `-thirdparty` and its own on/off switch. -Under the [SLA](../sla.md), the commitment on Monthly Uptime Percentage applies to the availability of the Service for GreenNode Models; GreenNode does not commit to any SLA for Third-party Models. The list of available models and their classification are published and updated by GreenNode on the [Service Console](https://aiplatform.console.greennode.ai/models). +The SLA applies to GreenNode Models only, not to Third-party Models — see [SLA](../sla.md). The list and classification of models are published by GreenNode on the [Service Console](https://aiplatform.console.greennode.ai/models). ## Check the result -`GET /v1/models` returns only the models your key can use, so it is the quickest check after a change. Calling a disabled model returns `403 request_denied` — “model not allowed for this key”. See [Models](../models/README.md). +`GET /v1/models` returns only the models your key can use, so it is the quickest check after a change. Calling a disabled model returns `403 request_denied` — “model not allowed for this key”. See [Models API](../api-reference/models.md) and [Models](../models/README.md). diff --git a/English/ai-stack/model-as-a-service/portal/models.md b/English/ai-stack/model-as-a-service/portal/models.md new file mode 100644 index 00000000..29b90b5d --- /dev/null +++ b/English/ai-stack/model-as-a-service/portal/models.md @@ -0,0 +1,81 @@ +--- +description: "The Models and Model detail pages: how to filter, sort, read a model card, pick a variant, and understand every field on the detail page." +--- + +# Models and Model detail pages + +## Models page + +Open [Models](https://aiplatform.console.greennode.ai/models). Your balance is shown at the top in **credits** (`1 credit = 1 VND`). + +### Filters + +The left sidebar has 5 filter groups; selecting several values in one group widens the result: + +| Filter group | Values | +| --- | --- | +| **Context length** | Slider from `Any length` to `1M` — only models whose context fits the range are shown. | +| **Hosting mode** | `Third-party`, `Self-hosted` | +| **API compatibility** | `Chat`, `Embedding`, `Rerank`, `OCR`, `Responses`, `Messages` | +| **Input modality** | `Text`, `Image`, `Video` | +| **Provider** | Google, DeepSeek, GreenNode, Qwen, BAAI, Minimax, Z.ai, Kimi | + +Use **Search models by name** to search by name, **Sort by** to order the list, and the Grid/List toggle to change the layout. + +### Model card + +| Element | Meaning | +| --- | --- | +| Badge `Third-party` / `Self-hosted` | Where the model runs. See [Self-host and third-party](enable-models.md#self-host-and-third-party). | +| Badge `ENABLED` / `DISABLED` | Whether the model is enabled for your account. | +| Switch | Enable / disable the model right on the card. | +| `1/2 ENABLED` + `2 variants` | The model has several variants; how many are enabled out of the total. | +| `by · ` | Provider and release date. | +| Model type at the bottom | `CHAT`, `RERANK`… | + +### Picking a variant + +Models with several variants (for example self-host and third-party) show the variant badges and an `N variants` dropdown on the card: + +* Click a variant badge directly on the card to open that variant's page. +* Click the `N variants` dropdown to open **Select a variant**, then choose the variant to view. + +Each variant has its own enabled state and price. + +## Model detail page + +Click a model name to open its detail page. The top right has **Variants** (switch variant), **Disable model** and **Try Playground** (open the Playground with this model). + +### Summary specs + +| Spec | Meaning | +| --- | --- | +| API compatibility | API standards that can call the model: `Chat`, `Responses`, `Messages`. | +| Release date | When the model was added to MaaS. | +| Modalities | Input → output data types, for example `Text, Image → Text`. | +| Context length | Maximum tokens for input + output. | +| Max output | Maximum output tokens. | +| Default TPM / Default RPM | Default token and request limits per minute for the model. | + +### Model information + +| Item | Meaning | +| --- | --- | +| Hosting mode | `Self-hosted` or `Third-party`. | +| Provider | The company behind the model. | +| API compatibility | API standards plus compatibility notes (for example Claude Code support). | +| Pricing | Price in **credits / 1,000,000 tokens** for input, cache and output. `TBA` = not published yet. | +| Capabilities | `Reasoning`, `Tool Calling`, `Structured Output`, `Prompt Caching`, `Vision`. A grey `Not Supported` label means the model does not support it. | +| Self-hosted details | `Precision`, `Total parameters`, `Weights` with a **Model weights** link. Self-hosted models only. | + +The **Best for** section suggests use cases that fit the model. + +### API Usage + +The **API Usage** tab ships ready-to-run code for `cURL`, `Python` and `Node.js` across all three call styles: `Chat` (`/v1/chat/completions`), `Messages` (`/v1/messages`) and `Responses` (`/v1/responses`). Click **COPY**, replace the API key and run. + +## Related + +* [Enable / disable models](enable-models.md) +* [Model list](../models/README.md) +* [Models API](../api-reference/models.md) diff --git a/English/ai-stack/model-as-a-service/pricing.md b/English/ai-stack/model-as-a-service/pricing.md index 4e8e6d55..bfde914b 100644 --- a/English/ai-stack/model-as-a-service/pricing.md +++ b/English/ai-stack/model-as-a-service/pricing.md @@ -10,7 +10,7 @@ description: >- MaaS supports multiple model types, and pricing depends on the type of model used. -Per-model unit prices are shown directly on the [AI Platform Portal](https://aiplatform.console.greennode.ai/models). +Per-model unit prices are shown directly on the [AI Platform Portal](https://aiplatform.console.greennode.ai/models). Balance and prices on the Portal are in **credits**; `1 credit = 1 VND`, so the values are unchanged. #### Model Classification for Billing diff --git a/English/ai-stack/release-notes.md b/English/ai-stack/release-notes.md index 603f0de1..48a6f556 100644 --- a/English/ai-stack/release-notes.md +++ b/English/ai-stack/release-notes.md @@ -4,6 +4,16 @@ A single timeline of updates across all GreenNode AI Stack products — GreenNod *** +## December 2026 + +**GreenNode MaaS — Model catalog upgrade: Portal UI, Models API, and auto-synced docs** + +* **Portal:** the Models page filters by Provider / Model type / Context length / Input modality / Use case and toggles a model right on its card; the model detail page shows credit/1M-token pricing, capabilities, self-hosted specs, and sample code for Chat / Messages / Responses. +* **API:** `GET /v1/models` and `GET /v1/models/{id}` return full OpenAI/OpenRouter metadata (context length, modality, pricing, supported parameters). +* **Docs:** the model catalog is auto-synced from the Portal and no longer drifts — see [Models API](model-as-a-service/api-reference/models.md) and [using the Portal](model-as-a-service/portal/models.md). + +*** + ## October 2026 **GreenNode AI Platform — Guardrail** diff --git a/English/overview/product-updates-all/2026.md b/English/overview/product-updates-all/2026.md index 4cc51b06..69585821 100644 --- a/English/overview/product-updates-all/2026.md +++ b/English/overview/product-updates-all/2026.md @@ -4,6 +4,14 @@ {% tab title="Updates" %} **December 2026** +**GreenNode MaaS - Model catalog upgrade: Portal UI, Models API, and auto-synced docs** + +The MaaS Portal has a new catalog page and model detail page, the Models API returns full metadata, and the docs catalog auto-syncs from the Portal. + +* The Models page filters by Provider / Model type / Context length / Input modality / Use case and toggles a model right on its card; the detail page shows credit/1M-token pricing, capabilities, and sample code for Chat / Messages / Responses. +* `GET /v1/models` and `GET /v1/models/{id}` return OpenAI/OpenRouter metadata. +* Learn more at [Models API](../../ai-stack/model-as-a-service/api-reference/models.md) and [using the Portal](../../ai-stack/model-as-a-service/portal/models.md). + **VKS – Automatic deletion of clusters with no active nodes shortened from 30 days to 7 days** VKS (VNG Kubernetes Engine) shortens the automatic deletion period for clusters with no active nodes from 30 days to 7 days, helping reduce costs from unused clusters. diff --git a/Vietnamese/SUMMARY.md b/Vietnamese/SUMMARY.md index ec8ef209..74de7ff5 100644 --- a/Vietnamese/SUMMARY.md +++ b/Vietnamese/SUMMARY.md @@ -842,7 +842,7 @@ * [GLM-5.2](ai-stack/model-as-a-service/models/z-ai/glm-5.2-thirdparty.md) * [GLM-5.3](ai-stack/model-as-a-service/models/z-ai/glm-5.3.md) * [GLM-5.3 Flash](ai-stack/model-as-a-service/models/z-ai/glm-5.3-flash.md) - * [GLM-5.3 Flash Thirdparty](ai-stack/model-as-a-service/models/z-ai/glm-5.3-flash-thirdparty.md) + * [GLM-5.3 Flash Third-party](ai-stack/model-as-a-service/models/z-ai/glm-5.3-flash-thirdparty.md) * [BGE-M3](ai-stack/model-as-a-service/models/baai/bge-m3.md) * [Qwen 3 Embedding 8B](ai-stack/model-as-a-service/models/qwen/qwen3-embedding-8b.md) * [BGE Reranker v2 m3](ai-stack/model-as-a-service/models/baai/bge-reranker-v2-m3.md) @@ -857,6 +857,7 @@ * [Bắt đầu nhanh](ai-stack/model-as-a-service/get-started/quickstart.md) * [FAQ](ai-stack/model-as-a-service/get-started/faq.md) * [Portal](ai-stack/model-as-a-service/portal/README.md) + * [Trang Models và Model detail](ai-stack/model-as-a-service/portal/models.md) * [API key](ai-stack/model-as-a-service/portal/api-keys.md) * [Bật / tắt model](ai-stack/model-as-a-service/portal/enable-models.md) * [Rate limit](ai-stack/model-as-a-service/portal/rate-limits.md) @@ -867,6 +868,7 @@ * [Responses](ai-stack/model-as-a-service/api-reference/responses.md) * [Embeddings](ai-stack/model-as-a-service/api-reference/embeddings.md) * [Rerank](ai-stack/model-as-a-service/api-reference/rerank.md) + * [Models](ai-stack/model-as-a-service/api-reference/models.md) * [OCR API](ai-stack/model-as-a-service/api-reference/ocr.md) * [Streaming](ai-stack/model-as-a-service/api-reference/streaming.md) * [Tham số](ai-stack/model-as-a-service/api-reference/parameters.md) diff --git a/Vietnamese/ai-stack/model-as-a-service/README.md b/Vietnamese/ai-stack/model-as-a-service/README.md index 3dbf939c..26ea4196 100644 --- a/Vietnamese/ai-stack/model-as-a-service/README.md +++ b/Vietnamese/ai-stack/model-as-a-service/README.md @@ -7,35 +7,20 @@ description: >- # Model as a Service -Truy cập vào phần [Models ](https://aiplatform.console.greennode.ai/models)trong AI Platform: +Truy cập vào phần [Models ](https://aiplatform.console.greennode.ai/models)trong AI Platform. Số dư hiển thị ở góc trên theo **credit** (`1 credit = 1 VND`). * Để sử dụng và enable bất kỳ mô hình nào, bạn cần có API key. [xem thêm](../ai-platform/bat-dau-voi-ai-platform.md#id-6.-quan-ly-api-keys) -Bạn có thể lọc các mô hình bằng các tùy chọn ở thanh bên trái: - -* Nhà cung cấp (Provider): Google, Anthropic, OpenAI, GreenNode, ... -* Loại mô hình (Model Type): - * Chat: Được thiết kế cho các cuộc hội thoại tương tác. Gọi qua Chat Completions, Messages (Anthropic) hoặc Responses tuỳ model. - * Embedding: chuyển đổi dữ liệu (văn bản, hình ảnh, âm thanh,…) thành vector nhiều chiều, giúp máy tính hiểu và so sánh ngữ nghĩa để phục vụ tìm kiếm, phân loại hoặc gợi ý nội dung. - * Rerank: Sắp xếp lại danh sách tài liệu theo mức độ liên quan với câu truy vấn. - * OCR: Trích xuất văn bản và dữ liệu từ ảnh, tài liệu. -* Trường hợp sử dụng (Use-case): - * Vietnamese: Tối ưu cho các tác vụ tiếng Việt. - * General Tasks: Phù hợp cho nhiều tác vụ chung. - * Translation: Chuyên về dịch thuật. - * Research: Hỗ trợ các tác vụ nghiên cứu. - * Finance: Chuyên về lĩnh vực tài chính. - * Marketing: Tối ưu cho tiếp thị. - * Technology: Phục vụ các tác vụ liên quan đến công nghệ. +Bạn có thể lọc và sắp xếp model ngay trên trang Models: **Context length**, **Hosting mode**, **API compatibility**, **Input modality**, **Provider**, cùng **Sort by** và **Search models by name**. Xem chi tiết từng bộ lọc, thẻ model và trang Model detail tại [Trang Models và Model detail](portal/models.md). ### Bật / Tắt mô hình -1. Nhấp vào nút "Bật/Tắt model" (Toggle models). User cần activate billing để enable model, đối với user Prepaid cần nạp quota để enable model còn user Postpaid có thể enable model và sử dụng được ngay. Tham khảo [cách tính phí](cach-tinh-phi.md)
+1. Nhấp vào nút **Enable / disable models**. User cần activate billing để enable model, đối với user Prepaid cần nạp quota để enable model còn user Postpaid có thể enable model và sử dụng được ngay. Tham khảo [cách tính phí](cach-tinh-phi.md)
2. Lựa chọn mô hình: Một cửa sổ popup sẽ hiện ra. Tại đây, bạn có thể tìm kiếm và lọc mô hình theo Nhà cung cấp (Provider), Trạng thái (Status) hoặc Loại mô hình (Type). -3. Bật/tắt riêng lẻ hoặc hàng loạt mô hình. +3. Bật/tắt riêng lẻ hoặc hàng loạt mô hình. Bạn cũng có thể bật/tắt ngay trên thẻ model bằng switch ở góc phải. 4. Lưu (Save) các thay đổi.
diff --git a/Vietnamese/ai-stack/model-as-a-service/api-reference/README.md b/Vietnamese/ai-stack/model-as-a-service/api-reference/README.md index 20ceb8c3..f38fe8ee 100644 --- a/Vietnamese/ai-stack/model-as-a-service/api-reference/README.md +++ b/Vietnamese/ai-stack/model-as-a-service/api-reference/README.md @@ -8,6 +8,7 @@ Các trang trong mục này: * [Responses](responses.md) * [Embeddings](embeddings.md) * [Rerank](rerank.md) +* [Models](models.md) * [OCR API](ocr.md) * [Streaming](streaming.md) * [Tham số](parameters.md) diff --git a/Vietnamese/ai-stack/model-as-a-service/api-reference/errors.md b/Vietnamese/ai-stack/model-as-a-service/api-reference/errors.md index 64de403f..53e4888c 100644 --- a/Vietnamese/ai-stack/model-as-a-service/api-reference/errors.md +++ b/Vietnamese/ai-stack/model-as-a-service/api-reference/errors.md @@ -10,6 +10,7 @@ description: "Lỗi do gateway sinh ra có mã máy đọc được trong header | --- | --- | --- | --- | | `invalid_request` | 400 | Thiếu prompt (`messages` thiếu hoặc rỗng — message "request body doesn't contain valid prompts"), tham số hoặc giá trị không hỗ trợ, `max_tokens` quá lớn, loại nội dung không hỗ trợ. | Không — sửa request | | `request_denied` | 401 | Thiếu API key, key không tồn tại, bị vô hiệu hoặc hết hạn. | Không | +| `invalid_api_key` | 401 | Thiếu hoặc sai API key khi gọi `/v1/models` — endpoint danh mục model. | Không | | `request_denied` | 403 | Model chưa được bật cho tài khoản (“model not allowed for this key”). | Không — bật model | | `request_denied` | 400 | Guardrail an toàn nội dung đã chặn request. Xem [An toàn nội dung](../features/content-safety.md). | Không | | `request_denied` | 429 | Vượt rate limit của bạn. Message cho biết giới hạn nào và số giây đến lúc reset. Xem [Giới hạn & rate limit](limits.md). | Có, sau khi reset | diff --git a/Vietnamese/ai-stack/model-as-a-service/api-reference/messages.md b/Vietnamese/ai-stack/model-as-a-service/api-reference/messages.md index a1963462..83bcde88 100644 --- a/Vietnamese/ai-stack/model-as-a-service/api-reference/messages.md +++ b/Vietnamese/ai-stack/model-as-a-service/api-reference/messages.md @@ -30,9 +30,7 @@ description: "Messages API tương thích Anthropic, dùng được với mọi | `tool_choice` | object | Tuỳ chọn | auto · any · tool · none | auto | Định dạng tool-choice của Anthropic. | {% hint style="info" %} -**Về khoảng giá trị và mặc định** - -Khoảng giá trị theo đặc tả API mà endpoint tương thích. Model có nhận một tham số hay không được liệt kê trong `supported_parameters` (`GET /v1/models`); tham số không có trong danh sách đó bị bỏ qua (không báo lỗi). Xem [Tham số](parameters.md) để biết bao nhiêu model hỗ trợ từng tham số. +Khoảng giá trị theo đặc tả API tương thích; tham số model không nhận bị bỏ qua (không báo lỗi). Xem [Tham số](parameters.md). {% endhint %} ## Ví dụ diff --git a/Vietnamese/ai-stack/model-as-a-service/api-reference/models.md b/Vietnamese/ai-stack/model-as-a-service/api-reference/models.md new file mode 100644 index 00000000..5df8fdbe --- /dev/null +++ b/Vietnamese/ai-stack/model-as-a-service/api-reference/models.md @@ -0,0 +1,104 @@ +--- +description: "Lấy danh mục model mà API key dùng được, kèm metadata đầy đủ theo chuẩn OpenAI/OpenRouter — context length, modality, giá và tham số hỗ trợ." +--- + +# Models + +`GET /v1/models` trả danh sách model mà API key của bạn dùng được. `GET /v1/models/{id}` trả chi tiết một model. Metadata theo chuẩn OpenAI/OpenRouter nên tool, SDK và script so sánh giá đọc được ngay, không phải tra docs thủ công. + +## Endpoint + +| Method | Path | Trả về | +| --- | --- | --- | +| `GET` | `/v1/models` | Danh sách model key dùng được | +| `GET` | `/v1/models/{id}` | Một model; `id` dạng `vendor/model`, ví dụ `z-ai/glm-5.3` | +| `HEAD` | `/v1/models/{id}` | `200` nếu model tồn tại, không có body | + +Gửi API key như mọi endpoint khác — xem [Xác thực](overview.md#xac-thuc). Danh sách chỉ gồm model key dùng được: model chưa bật, hoặc thuộc gói / sub-key đã hết hạn, không xuất hiện. + +## Query parameter + +| Tham số | Giá trị | Mô tả | +| --- | --- | --- | +| `view` | `basic` | Mỗi item chỉ gồm 6 field của shape cũ (`id`, `object`, `created`, `owned_by`…), không có `pricing`, `architecture`, `supported_parameters`. Giữ nguyên để code cũ không phải sửa. | + +## Field của một model + +| Field | Kiểu | Mô tả | +| --- | --- | --- | +| `id` | string | Model ID dạng `vendor/model`; dùng làm giá trị `model` khi gọi API. | +| `object` | string | Loại object, luôn là `model`. | +| `created` | integer | Thời điểm model vào catalog (Unix timestamp). | +| `description` | string | Mô tả model. | +| `context_length` | integer | Tổng token tối đa của input + output. | +| `architecture.modality` | string | Chiều dữ liệu, ví dụ `text->text`, `text+image->text`. | +| `architecture.tokenizer` | string | Tokenizer dùng để đếm token. | +| `pricing.prompt` | number | Giá mỗi input token, đơn vị credit. | +| `pricing.completion` | number | Giá mỗi output token, đơn vị credit. | +| `pricing.cache` | number | Giá mỗi cache token, đơn vị credit. | +| `supported_parameters` | array | Tham số model nhận, ví dụ `temperature`, `tools`, `reasoning_effort`. Luôn là mảng, không `null`. | +| `top_provider.max_completion_tokens` | integer | Output token tối đa. | +| `top_provider.is_moderated` | boolean | Model có qua lớp kiểm duyệt nội dung hay không. | +| `reasoning.mandatory` | boolean | `true` = luôn suy luận, không tắt được. | +| `reasoning.default_enabled` | boolean | `true` = suy luận khi không truyền gì. | +| `reasoning.default_effort` | string | Mức effort áp dụng khi không truyền. | +| `reasoning.supported_efforts` | array | Các mức `reasoning_effort` model nhận. | +| `per_request_limits` | object | Giới hạn request của model (ví dụ RPM) để client tự điều tiết trước khi gặp 429. | + +`pricing` là giá **mỗi token**. Để ra đơn vị quen thuộc **credit / 1.000.000 token**, nhân giá trị với `1.000.000`. `1 credit = 1 VND`. + +## Ví dụ + +Danh sách model: + +```bash +curl https://maas-llm-aiplatform-hcm.api.vngcloud.vn/v1/models \ + -H "Authorization: Bearer $GREENNODE_API_KEY" +``` + +```json +{ + "object": "list", + "data": [ + { + "id": "z-ai/glm-5.3", + "object": "model", + "created": 1751328000, + "description": "GLM-5.3 is Z.ai's open-weight flagship model ...", + "context_length": 1000000, + "architecture": { "modality": "text->text", "tokenizer": "glm" }, + "pricing": { "prompt": 0.0000371, "completion": 0.0001166, "cache": 0.00000689 }, + "supported_parameters": ["temperature", "tools", "reasoning_effort"], + "top_provider": { "max_completion_tokens": 131072, "is_moderated": false }, + "reasoning": { + "mandatory": true, + "default_enabled": true, + "default_effort": "max", + "supported_efforts": ["minimal", "low", "medium", "high", "xhigh", "max"] + } + } + ] +} +``` + +Chi tiết một model: + +```bash +curl https://maas-llm-aiplatform-hcm.api.vngcloud.vn/v1/models/z-ai/glm-5.3 \ + -H "Authorization: Bearer $GREENNODE_API_KEY" +``` + +Response là một object model (không bọc trong `data`), cùng schema với item ở trên. + +{% hint style="info" %} +`GET /v1/models` là nguồn dữ liệu nên dùng khi build tool. Trang [Danh sách model](../models/README.md) trên docs là bản đọc được của cùng danh mục đó. +{% endhint %} + +## Lỗi + +| HTTP | Code | Khi nào | +| --- | --- | --- | +| `401` | `invalid_api_key` | Thiếu API key hoặc key không hợp lệ. | +| `404` | `model_not_found` | `id` không tồn tại hoặc bạn không có quyền dùng model đó. | + +`401` trên các endpoint sinh nội dung (`/v1/chat/completions`, `/v1/messages`, `/v1/responses`) dùng mã `request_denied`; `/v1/models` dùng `invalid_api_key`. Xem [Lỗi](errors.md). diff --git a/Vietnamese/ai-stack/model-as-a-service/api-reference/ocr.md b/Vietnamese/ai-stack/model-as-a-service/api-reference/ocr.md index 96115d9e..2c27ce6d 100644 --- a/Vietnamese/ai-stack/model-as-a-service/api-reference/ocr.md +++ b/Vietnamese/ai-stack/model-as-a-service/api-reference/ocr.md @@ -9,7 +9,7 @@ description: "OCR xử lý tài liệu — upload file và xử lý bất đồn | Header | Bắt buộc | Giá trị | | --- | --- | --- | | `Authorization` | **Bắt buộc** | `Bearer ` | -| `portal-user-id` | Tùy chọn | Gateway tự gắn theo API key; nếu gửi thì phải trùng user ID trong đường dẫn URL. | +| `portal-user-id` | Tuỳ chọn | Gateway tự gắn theo API key; nếu gửi thì phải trùng user ID trong đường dẫn URL. | ## Gửi tài liệu diff --git a/Vietnamese/ai-stack/model-as-a-service/api-reference/overview.md b/Vietnamese/ai-stack/model-as-a-service/api-reference/overview.md index fc7f1b74..3c009d71 100644 --- a/Vietnamese/ai-stack/model-as-a-service/api-reference/overview.md +++ b/Vietnamese/ai-stack/model-as-a-service/api-reference/overview.md @@ -19,7 +19,8 @@ https://maas-llm-aiplatform-hcm.api.vngcloud.vn | [`POST /v1/responses`](responses.md) | OpenAI Responses | ✓ | | [`POST /v1/embeddings`](embeddings.md) | OpenAI Embeddings | — | | [`POST /v1/rerank`](rerank.md) | Rerank (`query` + `documents`) | — | -| [`GET /v1/models`](../models/README.md) | Danh mục model | — | +| [`GET /v1/models`](models.md) | Danh mục model (OpenAI/OpenRouter) | — | +| [`GET /v1/models/{id}`](models.md) | Chi tiết một model | — | ## Xác thực @@ -30,7 +31,7 @@ Gửi API key qua một trong hai header sau: | `Authorization: Bearer ` | OpenAI SDK, curl | | `x-api-key: ` | Anthropic SDK, Claude Code | -Thiếu key hoặc key không hợp lệ → **401** `request_denied`. Model chưa được bật cho key → **403** `request_denied`. +Thiếu key hoặc key không hợp lệ → **401** `request_denied`. Model chưa được bật cho key → **403** `request_denied`. Riêng `/v1/models` trả **401** `invalid_api_key` khi thiếu hoặc sai key. Xem [Lỗi](errors.md). ## Chọn model diff --git a/Vietnamese/ai-stack/model-as-a-service/api-reference/parameters.md b/Vietnamese/ai-stack/model-as-a-service/api-reference/parameters.md index b6ae462d..64a2a6d8 100644 --- a/Vietnamese/ai-stack/model-as-a-service/api-reference/parameters.md +++ b/Vietnamese/ai-stack/model-as-a-service/api-reference/parameters.md @@ -21,7 +21,7 @@ description: "Cùng một khái niệm nhưng tên trường khác nhau trên m | Lý do dừng | `finish_reason` | `stop_reason` | `status` | {% hint style="info" %} -Không phải model nào cũng hỗ trợ mọi tham số. Kiểm tra `supported_parameters` trong [`GET /v1/models`](../models/README.md). `top_k`, `min_p`, `repetition_penalty` chỉ dùng được với model có liệt kê chúng. +Không phải model nào cũng hỗ trợ mọi tham số. Kiểm tra `supported_parameters` trong [`GET /v1/models`](models.md). `top_k`, `min_p`, `repetition_penalty` chỉ dùng được với model có liệt kê chúng. {% endhint %} ## Mức hỗ trợ tham số theo model diff --git a/Vietnamese/ai-stack/model-as-a-service/api-reference/responses.md b/Vietnamese/ai-stack/model-as-a-service/api-reference/responses.md index d46dd4a7..73e451bb 100644 --- a/Vietnamese/ai-stack/model-as-a-service/api-reference/responses.md +++ b/Vietnamese/ai-stack/model-as-a-service/api-reference/responses.md @@ -30,9 +30,7 @@ description: "OpenAI Responses API, dùng được với mọi model chat. Đư | `previous_response_id` | string | Tuỳ chọn | — | — | **Không hỗ trợ.** Gateway không lưu trạng thái; hãy gửi toàn bộ hội thoại trong `input` ở mỗi lượt. | {% hint style="info" %} -**Về khoảng giá trị và mặc định** - -Khoảng giá trị theo đặc tả API mà endpoint tương thích. Model có nhận một tham số hay không được liệt kê trong `supported_parameters` (`GET /v1/models`); tham số không có trong danh sách đó bị bỏ qua (không báo lỗi). Xem [Tham số](parameters.md) để biết bao nhiêu model hỗ trợ từng tham số. +Khoảng giá trị theo đặc tả API tương thích; tham số model không nhận bị bỏ qua (không báo lỗi). Xem [Tham số](parameters.md). {% endhint %} {% hint style="info" %} diff --git a/Vietnamese/ai-stack/model-as-a-service/bang-gia-model.md b/Vietnamese/ai-stack/model-as-a-service/bang-gia-model.md index f0d0e2bf..cc6f3318 100644 --- a/Vietnamese/ai-stack/model-as-a-service/bang-gia-model.md +++ b/Vietnamese/ai-stack/model-as-a-service/bang-gia-model.md @@ -12,9 +12,9 @@ Bảng giá hiện hành của các model trên GreenNode MaaS. Các lần thay ### 1. Model tính theo Token -Đơn vị: **VNĐ / 1.000.000 token**. Xem cách áp dụng công thức tính phí tại [Cách tính phí](cach-tinh-phi.md). +Đơn vị: **credit / 1.000.000 token** (`1 credit = 1 VND`). Xem cách áp dụng công thức tính phí tại [Cách tính phí](cach-tinh-phi.md). -| Model | Loại | Giá (VNĐ) | +| Model | Loại | Giá (credit) | | ------------------------ | ------ | --------: | | DeepSeek V4.1 Flash | Input | 8.507 | | DeepSeek V4.1 Flash | Output | 34.026 | @@ -37,9 +37,9 @@ Bảng giá hiện hành của các model trên GreenNode MaaS. Các lần thay | GLM-5.3 Flash | Input | 4.253 | | GLM-5.3 Flash | Output | 14.178 | | GLM-5.3 Flash | Cache | 851 | -| GLM-5.3 Flash Thirdparty | Input | 4.253 | -| GLM-5.3 Flash Thirdparty | Output | 14.178 | -| GLM-5.3 Flash Thirdparty | Cache | 851 | +| GLM-5.3 Flash Third-party | Input | 4.253 | +| GLM-5.3 Flash Third-party | Output | 14.178 | +| GLM-5.3 Flash Third-party | Cache | 851 | | Kimi K2.7 Code | Input | 26.937 | | Kimi K2.7 Code | Output | 113.420 | | Kimi K2.7 Code | Cache | 5.387 | @@ -70,7 +70,7 @@ Bảng giá hiện hành của các model trên GreenNode MaaS. Các lần thay ### 2. Model Embedding, Rerank & OCR -| Model | Loại | Giá (VNĐ) | +| Model | Loại | Giá (credit) | | ------------------- | ------ | -----------: | | BGE Reranker v2 m3 | Input | 265 | | BGE-M3 | Input | 2.836 | diff --git a/Vietnamese/ai-stack/model-as-a-service/cac-model-duoc-cung-cap.md b/Vietnamese/ai-stack/model-as-a-service/cac-model-duoc-cung-cap.md index 64de2e74..f72e7f44 100644 --- a/Vietnamese/ai-stack/model-as-a-service/cac-model-duoc-cung-cap.md +++ b/Vietnamese/ai-stack/model-as-a-service/cac-model-duoc-cung-cap.md @@ -8,18 +8,7 @@ Danh mục model bên dưới gồm model do GreenNode self-host và model third ### Rate limit -Mặc định áp dụng cho **mọi tài khoản mới** dùng MaaS API, tính **riêng cho từng model**: - -| Giới hạn | Giá trị mặc định (mỗi model) | -| --- | --- | -| Request | **10 RPM** — 10 request/phút | -| Token | **1.000.000 TPM** — 1 triệu token/phút | - -Mỗi model có bộ đếm riêng: gọi model A không làm giảm hạn mức của model B. Xem chi tiết tại [Rate limit](portal/rate-limits.md). - -{% hint style="info" %} -Cần mức cao hơn? Hãy [liên hệ GreenNode](https://helpdesk.greennode.ai/portal/vi/newticket) để được xem xét đưa vào **whitelist**. Whitelist được xét theo từng trường hợp cụ thể. -{% endhint %} +Mặc định **10 RPM** và **1.000.000 TPM** trên từng model, đếm riêng từng model. Xem chi tiết và cách đề nghị tăng tại [Rate limit](portal/rate-limits.md). *** @@ -34,4 +23,4 @@ Model được cung cấp theo một trong hai hình thức: Theo [Cam kết SLA](cam-ket-sla.md), cam kết về Tỷ Lệ Uptime Hàng Tháng áp dụng đối với tính sẵn sàng của Dịch Vụ đối với các Mô Hình GreenNode; GreenNode không cam kết SLA đối với Mô Hình Bên Thứ Ba. Danh sách các mô hình được cung cấp và phân loại mô hình được GreenNode công bố và cập nhật trên [Console của Dịch Vụ](https://aiplatform.console.greennode.ai/models). -MaaS hỗ trợ các loại model: **Chat**, **Embedding**, **Rerank** và **OCR**. +MaaS hỗ trợ các loại model **Chat**, **Embedding**, **Rerank** và **OCR**. Model Chat gọi được qua một hoặc nhiều chuẩn API: **Chat Completions**, **Messages** (Anthropic) và **Responses** — xem cột `API compatibility` trên trang Model detail. diff --git a/Vietnamese/ai-stack/model-as-a-service/cach-tinh-phi.md b/Vietnamese/ai-stack/model-as-a-service/cach-tinh-phi.md index 6fa94284..214186de 100644 --- a/Vietnamese/ai-stack/model-as-a-service/cach-tinh-phi.md +++ b/Vietnamese/ai-stack/model-as-a-service/cach-tinh-phi.md @@ -10,7 +10,7 @@ description: >- MaaS hỗ trợ nhiều loại model khác nhau, và **cách tính phí phụ thuộc vào loại model được sử dụng**. -Đơn giá chi tiết của từng model được hiển thị trực tiếp trên [Portal AI Platform](https://aiplatform.console.greennode.ai/models). +Đơn giá chi tiết của từng model được hiển thị trực tiếp trên [Portal AI Platform](https://aiplatform.console.greennode.ai/models). Số dư và đơn giá trên Portal tính bằng **credit**; `1 credit = 1 VND` nên giá trị không đổi. #### Phân loại model theo billing diff --git a/Vietnamese/ai-stack/model-as-a-service/features/reasoning.md b/Vietnamese/ai-stack/model-as-a-service/features/reasoning.md index 31b083b8..110726a5 100644 --- a/Vietnamese/ai-stack/model-as-a-service/features/reasoning.md +++ b/Vietnamese/ai-stack/model-as-a-service/features/reasoning.md @@ -12,7 +12,7 @@ Cột **Reasoning** trong [Danh sách model](../models/README.md) có ba giá tr | --- | --- | --- | | **Luôn bật** | Model luôn suy luận. Bạn có thể hạ mức effort nhưng không tắt được. | `reasoning.mandatory: true` | | **Mặc định bật** | Model suy luận nếu bạn không chỉ định gì; có thể tắt hoặc hạ effort. | `mandatory: false`, `default_enabled: true` | -| **Tùy chọn** | Model chỉ suy luận khi bạn bật (đặt `reasoning_effort`). | `mandatory: false`, `default_enabled: false` | +| **Tuỳ chọn** | Model chỉ suy luận khi bạn bật (đặt `reasoning_effort`). | `mandatory: false`, `default_enabled: false` | ## Đặt mức effort @@ -24,7 +24,7 @@ Cột **Reasoning** trong [Danh sách model](../models/README.md) có ba giá tr Giá trị hợp lệ: `none` · `minimal` · `low` · `medium` · `high` · `xhigh` · `max`. Giá trị khác → 400. -* Mỗi model hỗ trợ một tập con (xem `reasoning.supported_efforts` ở trang [Danh sách model](../models/README.md)). Giá trị model không hỗ trợ trực tiếp sẽ được ánh xạ sang mức gần nhất. +* Mỗi model hỗ trợ một tập con (xem `reasoning.supported_efforts` trong [Models API](../api-reference/models.md)). Giá trị model không hỗ trợ trực tiếp sẽ được ánh xạ sang mức gần nhất. * Nếu không đặt effort, mức `default_effort` của model được dùng — với nhiều model đó là `max`, chậm và tốn token. * Model có `reasoning.mandatory: true` luôn suy luận; `none` chỉ hạ effort xuống mức thấp nhất chứ không tắt hẳn. diff --git a/Vietnamese/ai-stack/model-as-a-service/features/web-search.md b/Vietnamese/ai-stack/model-as-a-service/features/web-search.md index c3300456..eab7271f 100644 --- a/Vietnamese/ai-stack/model-as-a-service/features/web-search.md +++ b/Vietnamese/ai-stack/model-as-a-service/features/web-search.md @@ -16,7 +16,7 @@ Có trên `google/gemma-4-31b-it`. Các model khác từ chối tool (400 `inval | Responses | `{"type": "web_search"}` | | Messages | `{"type": "web_search_20250305", "name": "web_search"}` | -Tùy chọn trên tool: +Tuỳ chọn trên tool: | Option | Ý nghĩa | | --- | --- | diff --git a/Vietnamese/ai-stack/model-as-a-service/maas-api.md b/Vietnamese/ai-stack/model-as-a-service/maas-api.md index 882be2c7..0dfe7190 100644 --- a/Vietnamese/ai-stack/model-as-a-service/maas-api.md +++ b/Vietnamese/ai-stack/model-as-a-service/maas-api.md @@ -1,144 +1,23 @@ # MaaS API -**MaaS** cung cấp một API **tương thích với OpenAI** để thực hiện suy luận mô hình một cách liền mạch. Bạn có thể dễ dàng tích hợp bằng **Python, JavaScript SDK**, hoặc trực tiếp qua **terminal với cURL**. +**MaaS** cung cấp API **tương thích OpenAI và Anthropic** để gọi model. Bạn có thể tích hợp bằng **Python / JavaScript SDK**, hoặc trực tiếp qua **terminal với cURL**. -## 1. API tương thích OpenAI (Chat, Completion, Embedding, Image Generation) +## 1. API Usage — ba kiểu gọi -Tham khảo các Script trong API Usage trên Portal +Trang Model detail trên Portal có tab **API Usage** với code mẫu sẵn cho cả ba kiểu gọi và ba ngôn ngữ: -_Curl_ +| Kiểu gọi | Endpoint | Dùng khi | +| --- | --- | --- | +| Chat | `POST /v1/chat/completions` | OpenAI SDK, hầu hết client | +| Messages | `POST /v1/messages` | Anthropic SDK, Claude Code | +| Responses | `POST /v1/responses` | OpenAI SDK mới, Codex CLI | -
+Mỗi kiểu có code mẫu **cURL**, **Python** và **Node.js**; bấm **COPY** rồi thay API key là chạy được. -_Python_ - -
- -Javascript - -
+Chi tiết từng endpoint: [Chat Completions](api-reference/chat-completions.md) · [Messages](api-reference/messages.md) · [Responses](api-reference/responses.md). Base URL và xác thực: [Tổng quan API](api-reference/overview.md). Danh mục model: [Models API](api-reference/models.md). *** ## 2. OCR API -OCR là một loại model trong MaaS, nhưng do đặc thù xử lý tài liệu (upload file, xử lý bất đồng bộ) nên có bộ endpoint riêng thay vì dùng endpoint tương thích OpenAI ở trên. Phần dưới đây hướng dẫn cách gọi OCR API. - -### Submit OCR (upload file để tạo request) - -* **Method**: `POST` -* **URL**: `https://maas-llm-aiplatform-hcm.api.vngcloud.vn/maas/user-/greennode/idp/v1/ocr/ingest` -* **Headers**: - * `Authorization: Bearer ` - * `portal-user-id: ` (tùy chọn — gateway tự gắn theo API key; nếu gửi phải trùng user ID trong URL) -* **Body**: `multipart/form-data` - * `flow` (required) - * `single`: OCR 1 tài liệu - * hoặc ``: OCR theo bộ tài liệu (nếu bạn được cấp flow) - * `doc_type` (required nếu `flow=single`): ``, ví dụ `Doc2Text` (OCR văn bản chung). Loại tài liệu khác: liên hệ GreenNode - * `file_type` (required): `PDF` hoặc `IMAGE` - * `file` (required): file cần OCR. `PDF`: 1 file đuôi `.pdf`, 2 KB–50 MB. `IMAGE`: jpg, jpeg, png, bmp, tif, tiff, mỗi file 2 KB–10 MB, gửi được nhiều file - -#### Ví dụ - -```bash -curl --location 'https://maas-llm-aiplatform-hcm.api.vngcloud.vn/maas/user-/greennode/idp/v1/ocr/ingest' \ - --header 'Authorization: Bearer ' \ - --header 'portal-user-id: ' \ - --form 'flow="single"' \ - --form 'doc_type=""' \ - --form 'file_type="PDF"' \ - --form 'file=@""' -``` - -Thành công trả **201**, response chứa: - -* `data.request_id`: dùng để lấy kết quả -* `data.file_ids`: dùng để tải ảnh kết quả - -### Get OCR Result (dùng `request_id` để lấy text/data) - -* **Method**: `GET` -* **URL**: `https://maas-llm-aiplatform-hcm.api.vngcloud.vn/maas/user-/greennode/idp/v1/ocr/ingest/` -* **Headers**: - * `Authorization: Bearer ` - * `portal-user-id: ` - -#### Ví dụ - -```bash -curl --location 'https://maas-llm-aiplatform-hcm.api.vngcloud.vn/maas/user-/greennode/idp/v1/ocr/ingest/' \ - --header 'Authorization: Bearer ' \ - --header 'portal-user-id: ' -``` - -#### Nếu gọi ra chưa thấy data? - -Điều này bình thường vì OCR đang xử lý. - -* Đợi 2–5 giây và gọi lại API này (polling) cho tới khi `data.status` = `COMPLETED` (thành công) hoặc `FAILED` (xử lý thất bại, dừng polling). -* Nếu quá thời gian timeout mà vẫn không có dữ liệu, gửi `request_id` cho team support để kiểm tra. - -### Các API lấy thêm dữ liệu khác của OCR (tuỳ nhu cầu) - -#### Lấy bảng (TABLE) - -* **Method**: `GET` -* **URL**: `https://maas-llm-aiplatform-hcm.api.vngcloud.vn/maas/user-/greennode/idp/v1/ocr/ingest/table//` - -```bash -curl --location 'https://maas-llm-aiplatform-hcm.api.vngcloud.vn/maas/user-/greennode/idp/v1/ocr/ingest/table//' \ - --header 'Authorization: Bearer ' \ - --header 'portal-user-id: ' -``` - -#### Lấy kết quả chữ ký - -* **Method**: `GET` -* **URL**: `https://maas-llm-aiplatform-hcm.api.vngcloud.vn/maas/user-/greennode/idp/v1/ocr/ingest/signature//` - -```bash -curl --location 'https://maas-llm-aiplatform-hcm.api.vngcloud.vn/maas/user-/greennode/idp/v1/ocr/ingest/signature//' \ - --header 'Authorization: Bearer ' \ - --header 'portal-user-id: ' -``` - -Note: document\_id nằm trong `data.documents[].document_id` của response Get OCR Result - -#### Lấy kết quả con dấu - -* **Method**: `GET` -* **URL**: `https://maas-llm-aiplatform-hcm.api.vngcloud.vn/maas/user-/greennode/idp/v1/ocr/ingest/stamp//` - -```bash -curl --location 'https://maas-llm-aiplatform-hcm.api.vngcloud.vn/maas/user-/greennode/idp/v1/ocr/ingest/stamp//' \ - --header 'Authorization: Bearer ' \ - --header 'portal-user-id: ' -``` - -#### Tải ảnh kết quả - -* **Method**: `GET` -* **URL**: `https://maas-llm-aiplatform-hcm.api.vngcloud.vn/maas/user-/greennode/idp/v1/ocr/ingest/file//` - -```bash -curl --location 'https://maas-llm-aiplatform-hcm.api.vngcloud.vn/maas/user-/greennode/idp/v1/ocr/ingest/file//' \ - --header 'Authorization: Bearer ' \ - --header 'portal-user-id: ' -``` - -### Troubleshooting nhanh cho OCR - -* `401 Unauthorized`: - * Thiếu `Authorization` (`missing api key`) hoặc API key sai (`unknown api key`). -* `403 Forbidden`: - * User ID trong đường dẫn khác chủ sở hữu API key (`tenant mismatch`). -* `400 Bad Request`: - * Thiếu `doc_type` khi `flow=single`, thiếu `file_type`, thiếu `file`, hoặc loại / kích thước file không hợp lệ. -* `404 Not Found`: - * `request_id` không tồn tại. -* `500`: - * `Multipart field value cannot be null`: thiếu trường `flow`. - * `Doc Type not found`: `doc_type` không tồn tại. -* Polling mãi chưa ra kết quả: - * Gửi `request_id` + thời điểm gọi + file mẫu (nếu được) cho team support. +Model OCR (`greennode/idp`) nhận file và trả kết quả bất đồng bộ nên dùng bộ endpoint riêng, không nhận `model` trong body. Xem [OCR API](api-reference/ocr.md) để biết header, trường upload, polling và các endpoint lấy kết quả. diff --git a/Vietnamese/ai-stack/model-as-a-service/models/README.md b/Vietnamese/ai-stack/model-as-a-service/models/README.md index 2c436ba9..50276404 100644 --- a/Vietnamese/ai-stack/model-as-a-service/models/README.md +++ b/Vietnamese/ai-stack/model-as-a-service/models/README.md @@ -6,7 +6,7 @@ description: "Danh sách model GreenNode MaaS: độ dài ngữ cảnh, đầu v Mỗi model được gọi theo dạng `vendor/model`. Bấm vào tên model để xem chi tiết và ví dụ gọi API. -Cột **Reasoning**: **Luôn bật** = model luôn suy luận, chỉ giảm được mức `reasoning_effort` chứ không tắt được; **Mặc định bật** = có suy luận khi không truyền gì, tắt được; **Tùy chọn** = chỉ suy luận khi bạn bật; **—** = model không hỗ trợ suy luận. +Cột **Reasoning**: **Luôn bật** = model luôn suy luận, chỉ giảm được mức `reasoning_effort` chứ không tắt được; **Mặc định bật** = có suy luận khi không truyền gì, tắt được; **Tuỳ chọn** = chỉ suy luận khi bạn bật; **—** = model không hỗ trợ suy luận. ## Chat @@ -15,7 +15,7 @@ Cột **Reasoning**: **Luôn bật** = model luôn suy luận, chỉ giảm đư | [`deepseek/deepseek-v4-pro`](deepseek/deepseek-v4-pro.md) | DeepSeek V4 Pro | 1M | 384K | text | chat, responses, messages | Luôn bật | | [`deepseek/deepseek-v4.1-flash`](deepseek/deepseek-v4.1-flash.md) | DeepSeek V4.1 Flash 1017 | 1M | 384K | text, image | chat, responses, messages | Mặc định bật | | [`deepseek/deepseek-v4.1-flash-thirdparty`](deepseek/deepseek-v4.1-flash-thirdparty.md) | DeepSeek V4.1 Flash | 1M | 384K | text, image | chat, responses, messages | Mặc định bật | -| [`google/gemma-4-31b-it`](google/gemma-4-31b-it.md) | Gemma 4 31B-IT | 262K | 32K | text, image | chat, responses, messages | Tùy chọn | +| [`google/gemma-4-31b-it`](google/gemma-4-31b-it.md) | Gemma 4 31B-IT | 262K | 32K | text, image | chat, responses, messages | Tuỳ chọn | | [`kimi/kimi-k2.6`](kimi/kimi-k2.6.md) | Kimi K2.6 | 256K | 256K | text, image, video | chat, responses, messages | Mặc định bật | | [`kimi/kimi-k2.7-code`](kimi/kimi-k2.7-code.md) | Kimi K2.7 Code | 256K | 256K | text, image, video | chat, responses, messages | Luôn bật | | [`minimax/minimax-m3`](minimax/minimax-m3.md) | MiniMax M3 | 1M | 512K | text, image, video | chat, responses, messages | Luôn bật | @@ -28,7 +28,7 @@ Cột **Reasoning**: **Luôn bật** = model luôn suy luận, chỉ giảm đư | [`z-ai/glm-5.2-thirdparty`](z-ai/glm-5.2-thirdparty.md) | GLM-5.2 | 1M | 128K | text | chat, responses, messages | Mặc định bật | | [`z-ai/glm-5.3`](z-ai/glm-5.3.md) | GLM-5.3 | 1M | 128K | text | chat, responses, messages | Luôn bật | | [`z-ai/glm-5.3-flash`](z-ai/glm-5.3-flash.md) | GLM-5.3 Flash | 1M | 128K | text, image, video | chat, responses, messages | Luôn bật | -| [`z-ai/glm-5.3-flash-thirdparty`](z-ai/glm-5.3-flash-thirdparty.md) | GLM-5.3 Flash Thirdparty | 1M | 128K | text, image, video | chat, responses, messages | Luôn bật | +| [`z-ai/glm-5.3-flash-thirdparty`](z-ai/glm-5.3-flash-thirdparty.md) | GLM-5.3 Flash Third-party | 1M | 128K | text, image, video | chat, responses, messages | Luôn bật | ## Embedding diff --git a/Vietnamese/ai-stack/model-as-a-service/models/google/gemma-4-31b-it.md b/Vietnamese/ai-stack/model-as-a-service/models/google/gemma-4-31b-it.md index b65a7824..696761a0 100644 --- a/Vietnamese/ai-stack/model-as-a-service/models/google/gemma-4-31b-it.md +++ b/Vietnamese/ai-stack/model-as-a-service/models/google/gemma-4-31b-it.md @@ -16,7 +16,7 @@ Gemma 4 31B-IT is Google's open-weight instruction-tuned model from the Gemma 4 ## Reasoning -* Trạng thái: Tùy chọn +* Trạng thái: Tuỳ chọn * Các mức `reasoning_effort`: `low`, `medium`, `high` ## Tham số hỗ trợ diff --git a/Vietnamese/ai-stack/model-as-a-service/models/z-ai/glm-5.3-flash-thirdparty.md b/Vietnamese/ai-stack/model-as-a-service/models/z-ai/glm-5.3-flash-thirdparty.md index fbff983e..b222ed23 100644 --- a/Vietnamese/ai-stack/model-as-a-service/models/z-ai/glm-5.3-flash-thirdparty.md +++ b/Vietnamese/ai-stack/model-as-a-service/models/z-ai/glm-5.3-flash-thirdparty.md @@ -1,4 +1,4 @@ -# GLM-5.3 Flash Thirdparty +# GLM-5.3 Flash Third-party Model ID: `z-ai/glm-5.3-flash-thirdparty` · Loại: Chat diff --git a/Vietnamese/ai-stack/model-as-a-service/playground.md b/Vietnamese/ai-stack/model-as-a-service/playground.md index bbdb9736..640e0c75 100644 --- a/Vietnamese/ai-stack/model-as-a-service/playground.md +++ b/Vietnamese/ai-stack/model-as-a-service/playground.md @@ -9,6 +9,8 @@ description: >- ### Truy cập [Playground](https://aiplatform.console.greennode.ai/playground) +Từ trang [Models](portal/models.md), bấm **Go to Playground** để mở Playground. Từ trang Model detail, bấm **Try Playground** để mở Playground với đúng model và biến thể đang xem. + ### Hướng dẫn thử nghiệm mô hình 1. Chọn loại mô hình tùy thuộc vào tác vụ của bạn: Chat, Embedding, Rerank, OCR diff --git a/Vietnamese/ai-stack/model-as-a-service/portal/README.md b/Vietnamese/ai-stack/model-as-a-service/portal/README.md index a59a0065..b6d7e65b 100644 --- a/Vietnamese/ai-stack/model-as-a-service/portal/README.md +++ b/Vietnamese/ai-stack/model-as-a-service/portal/README.md @@ -2,6 +2,7 @@ Các trang trong mục này: +* [Trang Models và Model detail](models.md) * [API key](api-keys.md) * [Bật / tắt model](enable-models.md) * [Rate limit](rate-limits.md) diff --git a/Vietnamese/ai-stack/model-as-a-service/portal/enable-models.md b/Vietnamese/ai-stack/model-as-a-service/portal/enable-models.md index ae4f2d61..921c8029 100644 --- a/Vietnamese/ai-stack/model-as-a-service/portal/enable-models.md +++ b/Vietnamese/ai-stack/model-as-a-service/portal/enable-models.md @@ -15,19 +15,17 @@ description: "Model phải được bật cho tài khoản thì API key mới g ## Cách bật / tắt 1. Mở [Models](https://aiplatform.console.greennode.ai/models) trong AI Platform. -2. Bấm **Toggle models**. Một popup liệt kê các model; có thể tìm kiếm hoặc lọc theo Provider, Status, Type. +2. Bấm **Enable / disable models**. Một popup liệt kê các model; có thể tìm kiếm hoặc lọc theo Provider, Status, Type. 3. Bật/tắt từng model hoặc nhiều model cùng lúc. 4. Lưu thay đổi. -## Tìm model +## Bật / tắt trên thẻ model -Trang Models có bộ lọc ở thanh bên trái: +Ngoài popup, mỗi thẻ model trên trang [Models](models.md) có switch bật/tắt riêng. Model nhiều biến thể có switch cho từng biến thể; badge hiển thị `1/2 ENABLED` cho biết số biến thể đã bật. -| Bộ lọc | Giá trị | -| --- | --- | -| Provider | BAAI, DeepSeek, Google, GreenNode, Kimi, Minimax, Qwen, Z.ai | -| Model Type | Chat, Messages, Responses, Embedding, Rerank, OCR | -| Use case | Vietnamese, General Tasks, Translation, Research, Finance, Marketing, Technology | +## Tìm model + +Trang Models có bộ lọc ở thanh bên trái (Context length, Hosting mode, API compatibility, Input modality, Provider) và **Sort by**. Xem chi tiết từng bộ lọc tại [Trang Models và Model detail](models.md). ## Trạng thái model @@ -49,8 +47,8 @@ Trang Models có bộ lọc ở thanh bên trái: Model chạy trên hạ tầng GreenNode (**GreenNode self-host**) hoặc được chuyển tới nhà cung cấp model theo hợp đồng chính thức (**Third-party**). Một số dòng model có cả hai; biến thể qua đối tác có ID kết thúc bằng `-thirdparty` và công tắc bật/tắt riêng. -Theo [Cam kết SLA](../cam-ket-sla.md), cam kết về Tỷ Lệ Uptime Hàng Tháng áp dụng đối với tính sẵn sàng của Dịch Vụ đối với các Mô Hình GreenNode; GreenNode không cam kết SLA đối với Mô Hình Bên Thứ Ba. Danh sách các mô hình được cung cấp và phân loại mô hình được GreenNode công bố và cập nhật trên [Console của Dịch Vụ](https://aiplatform.console.greennode.ai/models). +SLA chỉ áp dụng cho Mô Hình GreenNode, không áp dụng cho Mô Hình Bên Thứ Ba — xem [Cam kết SLA](../cam-ket-sla.md). Danh sách và phân loại model được GreenNode công bố trên [Console của Dịch Vụ](https://aiplatform.console.greennode.ai/models). ## Kiểm tra kết quả -`GET /v1/models` chỉ trả các model mà key dùng được nên là cách kiểm tra nhanh nhất sau khi đổi. Gọi model đã tắt sẽ trả `403 request_denied` — “model not allowed for this key”. Xem [Danh sách model](../models/README.md). +`GET /v1/models` chỉ trả các model mà key dùng được nên là cách kiểm tra nhanh nhất sau khi đổi. Gọi model đã tắt sẽ trả `403 request_denied` — “model not allowed for this key”. Xem [Models API](../api-reference/models.md) và [Danh sách model](../models/README.md). diff --git a/Vietnamese/ai-stack/model-as-a-service/portal/models.md b/Vietnamese/ai-stack/model-as-a-service/portal/models.md new file mode 100644 index 00000000..f3b60990 --- /dev/null +++ b/Vietnamese/ai-stack/model-as-a-service/portal/models.md @@ -0,0 +1,81 @@ +--- +description: "Trang Models và Model detail: cách lọc, sắp xếp, đọc thẻ model, chọn biến thể và hiểu các thông số trên trang chi tiết." +--- + +# Trang Models và Model detail + +## Trang Models + +Mở [Models](https://aiplatform.console.greennode.ai/models). Số dư hiển thị ở góc trên theo **credit** (`1 credit = 1 VND`). + +### Bộ lọc + +Thanh bên trái có 5 nhóm lọc; chọn nhiều giá trị trong cùng nhóm để mở rộng kết quả: + +| Nhóm lọc | Giá trị | +| --- | --- | +| **Context length** | Thanh kéo từ `Any length` đến `1M` — chỉ hiện model có ngữ cảnh trong khoảng đã chọn. | +| **Hosting mode** | `Third-party`, `Self-hosted` | +| **API compatibility** | `Chat`, `Embedding`, `Rerank`, `OCR`, `Responses`, `Messages` | +| **Input modality** | `Text`, `Image`, `Video` | +| **Provider** | Google, DeepSeek, GreenNode, Qwen, BAAI, Minimax, Z.ai, Kimi | + +Dùng **Search models by name** để tìm theo tên, **Sort by** để sắp xếp danh sách, và nút Grid/List để đổi kiểu hiển thị. + +### Thẻ model + +| Thành phần | Ý nghĩa | +| --- | --- | +| Badge `Third-party` / `Self-hosted` | Nơi model chạy. Xem [Self-host và third-party](enable-models.md#self-host-va-third-party). | +| Badge `ENABLED` / `DISABLED` | Model đã bật hay chưa cho tài khoản. | +| Switch | Bật / tắt model ngay trên thẻ. | +| `1/2 ENABLED` + `2 variants` | Model có nhiều biến thể; số đã bật trên tổng số. | +| `by · ` | Hãng và ngày release. | +| Tên loại ở cuối thẻ | `CHAT`, `RERANK`… | + +### Chọn biến thể + +Model có nhiều biến thể (ví dụ self-host và third-party) hiển thị badge biến thể và dropdown `N variants` trên thẻ: + +* Bấm trực tiếp badge biến thể trên thẻ để mở đúng trang của biến thể đó. +* Bấm dropdown `N variants` để mở hộp **Select a variant**, rồi chọn biến thể muốn xem. + +Mỗi biến thể có trạng thái bật/tắt và giá riêng. + +## Trang Model detail + +Bấm tên model để mở trang chi tiết. Góc phải có **Variants** (đổi biến thể), **Disable model** (tắt model) và **Try Playground** (mở Playground với model này). + +### Thông số tóm tắt + +| Thông số | Ý nghĩa | +| --- | --- | +| API compatibility | Các chuẩn API gọi được model: `Chat`, `Responses`, `Messages`. | +| Release date | Ngày model được đưa lên MaaS. | +| Modalities | Loại dữ liệu vào → ra, ví dụ `Text, Image → Text`. | +| Context length | Tổng token tối đa của input + output. | +| Max output | Số token output tối đa. | +| Default TPM / Default RPM | Giới hạn token và request mặc định mỗi phút cho model. | + +### Model information + +| Mục | Ý nghĩa | +| --- | --- | +| Hosting mode | `Self-hosted` hoặc `Third-party`. | +| Provider | Hãng phát triển model. | +| API compatibility | Chuẩn API và ghi chú tương thích (ví dụ hỗ trợ Claude Code). | +| Pricing | Giá **credit / 1.000.000 token** cho input, cache và output. `TBA` = chưa công bố. | +| Capabilities | `Reasoning`, `Tool Calling`, `Structured Output`, `Prompt Caching`, `Vision`. Nhãn xám `Not Supported` = model không hỗ trợ. | +| Self-hosted details | `Precision`, `Total parameters`, `Weights` kèm link **Model weights**. Chỉ có với model self-host. | + +Phần **Best for** gợi ý các use case phù hợp với model. + +### API Usage + +Tab **API Usage** có code mẫu sẵn cho `cURL`, `Python`, `Node.js` ở cả ba kiểu gọi `Chat` (`/v1/chat/completions`), `Messages` (`/v1/messages`) và `Responses` (`/v1/responses`). Bấm **COPY** để lấy đoạn code, thay API key là chạy được. + +## Liên quan + +* [Bật / tắt model](enable-models.md) +* [Danh sách model](../models/README.md) +* [Models API](../api-reference/models.md) diff --git a/Vietnamese/ai-stack/release-notes.md b/Vietnamese/ai-stack/release-notes.md index 93794474..891bb8f5 100644 --- a/Vietnamese/ai-stack/release-notes.md +++ b/Vietnamese/ai-stack/release-notes.md @@ -4,6 +4,16 @@ Tổng hợp các bản cập nhật của toàn bộ sản phẩm trong GreenNo *** +## Tháng 12, 2026 + +**GreenNode MaaS — Nâng cấp danh mục model: UI Portal, Models API và docs tự đồng bộ** + +* **Portal:** trang Models lọc theo Provider / Model type / Context length / Input modality / Use case và bật/tắt model ngay trên thẻ; trang chi tiết model có giá credit/1M token, capabilities, thông số self-host và code mẫu Chat / Messages / Responses. +* **API:** `GET /v1/models` và `GET /v1/models/{id}` trả đầy đủ metadata chuẩn OpenAI/OpenRouter (context length, modality, pricing, supported parameters). +* **Docs:** danh mục model tự đồng bộ từ Portal, không còn lệch — xem [Models API](model-as-a-service/api-reference/models.md) và [hướng dẫn dùng Portal](model-as-a-service/portal/models.md). + +*** + ## Tháng 10, 2026 **GreenNode AI Platform — Guardrail** diff --git a/Vietnamese/gioi-thieu-chung/thong-bao-va-cap-nhat/2026.md b/Vietnamese/gioi-thieu-chung/thong-bao-va-cap-nhat/2026.md index 263f52ab..7ebcce6b 100644 --- a/Vietnamese/gioi-thieu-chung/thong-bao-va-cap-nhat/2026.md +++ b/Vietnamese/gioi-thieu-chung/thong-bao-va-cap-nhat/2026.md @@ -4,6 +4,14 @@ {% tab title="Nâng cấp mới" %} **Tháng 12, 2026** +**GreenNode MaaS - Nâng cấp danh mục model: UI Portal, Models API và docs tự đồng bộ** + +Portal MaaS có trang danh mục và trang chi tiết model mới, Models API trả đầy đủ metadata và docs tự đồng bộ danh mục model từ Portal. + +* Trang Models lọc theo Provider / Model type / Context length / Input modality / Use case, bật/tắt model ngay trên thẻ; trang chi tiết có giá credit/1M token, capabilities và code mẫu Chat / Messages / Responses. +* `GET /v1/models` và `GET /v1/models/{id}` trả metadata chuẩn OpenAI/OpenRouter. +* Tìm hiểu thêm tại [Models API](../../ai-stack/model-as-a-service/api-reference/models.md) và [hướng dẫn dùng Portal](../../ai-stack/model-as-a-service/portal/models.md). + **VKS – Rút ngắn thời hạn tự động xóa cluster không có node active từ 30 ngày còn 7 ngày** VKS (VNG Kubernetes Engine) rút ngắn thời gian tự động xóa cluster không có node active từ 30 ngày xuống 7 ngày, giúp giảm chi phí phát sinh từ các cluster không sử dụng.