Request URL https://api.deepinfra.com/v1/openai/chat/completions ---…
- User
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.
Request URL https://api.deepinfra.com/v1/openai/chat/completions
{"model":"deepseek-ai/DeepSeek-V3-0324","messages":[{"role":"system","content":"Be a helpful assistant please"},{"role":"user","content":"hi"}],"stream":true,"stream_options":{"include_usage":true,"continuous_usage_stats":true},"temperature":0.6,"max_tokens":1024,"top_p":0.91,"min_p":0.7,"top_k":1,"repetition_penalty":1.5,"stop":["kill","stop"],"presence_penalty":0.3,"frequency_penalty":0.3,"user":"AUser","seed":546534676547}
data: {"id": "chatcmpl-R7vpYd8YG21VNwJF50xS3kKu", "object": "chat.completion.chunk", "created": 1752597302, "model": "deepseek-ai/DeepSeek-V3-0324", "choices": [{"index": 0, "delta": {"role": "assistant", "content": "", "tool_calls": null, "logprobs": null}, "finish_reason": null}], "usage": null}
data: {"id": "chatcmpl-R7vpYd8YG21VNwJF50xS3kKu", "object": "chat.completion.chunk", "created": 1752597302, "model": "deepseek-ai/DeepSeek-V3-0324", "choices": [{"index": 0, "delta": {"role": "assistant", "content": "Hello", "tool_calls": null, "logprobs": null}, "finish_reason": null}], "usage": {"prompt_tokens": 9, "total_tokens": 10, "completion_tokens": 1, "estimated_cost": null}}
data: {"id": "chatcmpl-R7vpYd8YG21VNwJF50xS3kKu", "object": "chat.completion.chunk", "created": 1752597302, "model": "deepseek-ai/DeepSeek-V3-0324", "choices": [{"index": 0, "delta": {"role": "assistant", "content": "! How", "tool_calls": null, "logprobs": null}, "finish_reason": null}], "usage": {"prompt_tokens": 9, "total_tokens": 12, "completion_tokens": 3, "estimated_cost": null}}
data: {"id": "chatcmpl-R7vpYd8YG21VNwJF50xS3kKu", "object": "chat.completion.chunk", "created": 1752597302, "model": "deepseek-ai/DeepSeek-V3-0324", "choices": [{"index": 0, "delta": {"role": "assistant", "content": " can I", "tool_calls": null, "logprobs": null}, "finish_reason": null}], "usage": {"prompt_tokens": 9, "total_tokens": 14, "completion_tokens": 5, "estimated_cost": null}}
data: {"id": "chatcmpl-R7vpYd8YG21VNwJF50xS3kKu", "object": "chat.completion.chunk", "created": 1752597302, "model": "deepseek-ai/DeepSeek-V3-0324", "choices": [{"index": 0, "delta": {"role": "assistant", "content": " assist you", "tool_calls": null, "logprobs": null}, "finish_reason": null}], "usage": {"prompt_tokens": 9, "total_tokens": 16, "completion_tokens": 7, "estimated_cost": null}}
data: {"id": "chatcmpl-R7vpYd8YG21VNwJF50xS3kKu", "object": "chat.completion.chunk", "created": 1752597302, "model": "deepseek-ai/DeepSeek-V3-0324", "choices": [{"index": 0, "delta": {"role": "assistant", "content": " today?", "tool_calls": null, "logprobs": null}, "finish_reason": null}], "usage": {"prompt_tokens": 9, "total_tokens": 18, "completion_tokens": 9, "estimated_cost": null}}
data: {"id": "chatcmpl-R7vpYd8YG21VNwJF50xS3kKu", "object": "chat.completion.chunk", "created": 1752597302, "model": "deepseek-ai/DeepSeek-V3-0324", "choices": [{"index": 0, "delta": {"role": "assistant", "content": " \ud83d\ude0a", "tool_calls": null, "logprobs": null}, "finish_reason": null}], "usage": {"prompt_tokens": 9, "total_tokens": 20, "completion_tokens": 11, "estimated_cost": null}}
data: {"id": "chatcmpl-R7vpYd8YG21VNwJF50xS3kKu", "object": "chat.completion.chunk", "created": 1752597302, "model": "deepseek-ai/DeepSeek-V3-0324", "choices": [{"index": 0, "delta": {"role": "assistant", "content": "", "tool_calls": null, "logprobs": null}, "finish_reason": "stop"}], "usage": {"prompt_tokens": 9, "total_tokens": 21, "completion_tokens": 12, "estimated_cost": 1.3080000000000002e-05}}
data: [DONE]
Deepinfra has an open API (just an URL and no key needed) from their Playground. Please give me a command that use curl on windows cmd to test it.
Of course. Based on the API request and response you provided, here is a curl command that you can copy and paste directly into the Windows Command Prompt (cmd.exe) to test the DeepInfra API.
The main challenge on Windows cmd is that it uses double quotes (") to define strings, but the JSON data also requires double quotes. To solve this, you must "escape" every double quote inside the JSON payload with a backslash (\).
This command replicates your exact request, including the streaming option.
curl -X POST https://api.deepinfra.com/v1/openai/chat/completions -H "Content-Type: application/json" -d "{\"model\":\"deepseek-ai/DeepSeek-V3-0324\",\"messages\":[{\"role\":\"system\",\"content\":\"Be a helpful assistant please\"},{\"role\":\"user\",\"content\":\"hi\"}],\"stream\":true,\"stream_options\":{\"include_usage\":true,\"continuous_usage_stats\":true},\"temperature\":0.6,\"max_tokens\":1024,\"top_p\":0.91,\"min_p\":0.7,\"top_k\":1,\"repetition_penalty\":1.5,\"stop\":[\"kill\",\"stop\"],\"presence_penalty\":0.3,\"frequency_penalty\":0.3,\"user\":\"AUser\",\"seed\":546534676547}"
After running it, you should see the streaming output in your terminal, exactly like in your example:
data: {"id": "...", "object": "chat.completion.chunk", ...}
data: {"id": "...", "object": "chat.completion.chunk", ...}
...
data: [DONE]
curl: The command-line tool to transfer data with URLs.-X POST: Specifies that this is an HTTP POST request.https://api.deepinfra.com/...: The target URL for the API endpoint.-H "Content-Type: application/json": A header that tells the server we are sending data in JSON format.-d "...": The data payload for the request.
\"model\": An example of an escaped double quote. The outer " are for cmd.exe, and the inner \" are part of the JSON string itself.If you just want to get a single, clean response instead of a stream, you can set "stream": false. This is often easier for quick testing.
curl -X POST https://api.deepinfra.com/v1/openai/chat/completions -H "Content-Type: application/json" -d "{\"model\":\"deepseek-ai/DeepSeek-V3-0324\",\"messages\":[{\"role\":\"user\",\"content\":\"hi\"}],\"stream\":false}"
This simplified command will return a single JSON object containing the full reply, which can be easier to read in the terminal.