grok2api icon indicating copy to clipboard operation
grok2api copied to clipboard

question: 测试没通过, 难道这么不行吗

Open kadisyy opened this issue 6 months ago • 4 comments

问题

curl http://localhost:8000/v1/chat/completions
-H "Content-Type: application/json"
-H "Authorization: Bearer grok2api"
-d '{ "model": "grok-4",
"messages": [{"role":"user","content":"你好"}] }'

{"error":{"message":"Model 'grok-4' does not exist or you do not have access to it.","type":"invalid_request_error","code":"model_not_found","param":"model"}}%

上下文(配置 / 日志)


kadisyy avatar Jun 03 '26 11:06 kadisyy

没有这个模型,你填错模型了

shiqi4417-ctrl avatar Jun 03 '26 16:06 shiqi4417-ctrl

没有这个模型,你填错模型了

有哪些模型 我看grok 需要购买 才能看到具体的模型?

Image

这个也不行 curl http://localhost:8000/v1/chat/completions
-H "Content-Type: application/json"
-H "Authorization: Bearer grok2api"
-d '{ "model": "grok-4.3", "messages": [{"role":"user","content":"你好"}] }'

kadisyy avatar Jun 04 '26 06:06 kadisyy

https://github.com/chenyme/grok2api#chat 项目里有写

shiqi4417-ctrl avatar Jun 04 '26 11:06 shiqi4417-ctrl

https://github.com/chenyme/grok2api#chat 项目里有写

谢谢 感觉访问被拒了

curl http://localhost:8000/v1/chat/completions -H "Content-Type: application/json" -H "Authorization: Bearer grok2api" -d '{ "model": "grok-4.20-0309-non-reasoning", "messages": [{"role":"user","content":"你好"}] }'

event: error data: {"error":{"message":"Transport request failed: Failed to perform, curl: (35) Recv failure: Connection reset by peer. See https://curl.se/libcurl/c/libcurl-errors.html first for more details.","type":"upstream_error","code":"upstream_error"}}

data: [DONE]

kadisyy avatar Jun 04 '26 11:06 kadisyy