Gebruik de OpenAI Responses API voor gesprekken. Responses API is het nieuwste OpenAI API-formaat met flexibelere invoer.
Bearer YOUR_API_KEY| Parameter | Type | Vereist | Beschrijving |
|---|---|---|---|
| model | string | Vereist | Modelnaam, bijv. deepseek-v4.1-flash, qwen3.8-max |
| input | string | Vereist | Invoertekst of gespreksinhoud |
| max_tokens | integer | Optioneel | Maximaal aantal uitvoertokens |
| temperature | float | Optioneel | Samplingtemperatuur, regelt willekeurigheid (0-2) |
| stream | boolean | Optioneel | Streaming response inschakelen, stel in op true voor SSE |
| Parameter | Type | Beschrijving |
|---|---|---|
| id | string | Unieke response-identificatie |
| model | string | Daadwerkelijk gebruikt model |
| output | string | Gegenereerde tekstuitvoer |
| usage | object | Tokengebruiksstatistieken inclusief prompt_tokens, completion_tokens, total_tokens |
curl https://your-domain.com/api/ai/v1/responses \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"model": "deepseek-v4.1-flash",
"input": "Hello, who are you?",
"max_tokens": 1000
}'