专项模型

embedding代码例子 Hướng Dẫn API

Hướng dẫn embedding代码例子 cho aliapi.me, gồm Base URL tương thích OpenAI, API key, tên model, cấu trúc request và cách xử lý lỗi.

Mục đích

Hướng dẫn embedding代码例子 cho aliapi.me, gồm Base URL tương thích OpenAI, API key, tên model, cấu trúc request và cách xử lý lỗi.

Checklist tích hợp

  • Base URL: https://api.aliapi.me/v1.
  • Authentication: Authorization: Bearer YOUR_API_KEY.
  • Model names should be copied from the aliapi.me model catalog.
  • Endpoint hint: /v1/embeddings 或对应模型接口.

Cấu trúc request

{
  "model": "copy-model-name-from-catalog",
  "messages": [
    {"role": "user", "content": "your task here"}
  ]
}

Xử lý lỗi

Start with a minimal chat request, then verify the API key, Base URL, model name, quota, request fields and request logs.