Cloud Services API
OpenAI
completions
# # Choose between streaming and non-streaming mode by setting the "stream" field
curl http://localhost:1234/v1/chat/completions \
-H "Authorization: Bearer {token}" \
-H "Content-Type: application/json" \
-d '{
"messages": [
{ "role": "system", "content": "Always answer in rhymes." },
{ "role": "user", "content": "Introduce yourself." }
],
"frequency_penalty": 0,
"model": "@hf/google/gemma-7b-it",
"presence_penalty": 0,
"temperature": 0.3,
"top_p": 1,
"max_tokens": -1,
"stream": true
}'
Cloudflare
Token verify
curl -X GET "https://api.cloudflare.com/client/v4/user/tokens/verify" \
-H "Authorization: Bearer {your_token}" \
-H "Content-Type:application/json"
GitHub
Wayne
Wechat Notify
curl -X POST -s \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer {token}' \
-d '{"title": "this is a new notify"}' \
https://notify.waynecommand.com/wechat
天气
openweathermap.org
curl 'https://api.openweathermap.org/data/2.5/weather?lat=31.222&lon=121.485&appid={your_app_id}'
accuweather
https://developer.accuweather.com/apis
- shanghai:106577
now:
curl https://dataservice.accuweather.com/currentconditions/v1/106577?apikey={api_key}
hourly:
curl https://dataservice.accuweather.com/forecasts/v1/hourly/1hour/106577?apikey={api_key}
qweather.com
curl 'https://devapi.qweather.com/v7/weather/now?key={api_key}&location=121.485,31.222&lang=en'