Skip to content

cURL 示例

聊天补全

bash
curl https://www.meteorlink.net/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
    "model": "gpt-4o",
    "messages": [
      {"role": "system", "content": "You are a helpful assistant."},
      {"role": "user",   "content": "Hello!"}
    ]
  }'

流式输出

bash
curl https://www.meteorlink.net/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
    "model": "gpt-4o",
    "messages": [{"role": "user", "content": "Hello!"}],
    "stream": true
  }'

获取模型列表

bash
curl https://www.meteorlink.net/v1/models \
  -H "Authorization: Bearer YOUR_API_KEY"

文本嵌入

bash
curl https://www.meteorlink.net/v1/embeddings \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
    "model": "text-embedding-3-small",
    "input": "The quick brown fox"
  }'

Powered by MeteorLink