Skip to main content
The completions API is the legacy text generation interface — you provide a raw prompt string and the model continues it. For most use cases, the Chat Completions API is simpler and recommended instead. The endpoint is:
This is an advanced API. You need to know your model’s exact prompt format. Different models have different input formats. Check the model’s API section on its page for the expected format.

Example

The example below uses deepseek-ai/DeepSeek-V3 with its prompt format:

Supported parameters

For every model, you can check its prompt format in the API section on its page. For the complete parameter reference, see the API reference.