Service API Integration · 02
30-Second Quick Test
bash
curl -sS "$JF_BASE_URL/chat/completions" \
-H "Authorization: Bearer $JF_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"stream": false,
"messages": [{"role": "user", "content": "Introduce yourself in one sentence"}]
}'Response:
json
{
"id": "chatcmpl-xxxxxxxxxxxx",
"object": "chat.completion",
"created": 1745300000,
"model": "<model bound to the service>",
"choices": [{
"index": 0,
"message": {"role": "assistant", "content": "..."},
"finish_reason": "stop"
}],
"usage": {"prompt_tokens": 0, "completion_tokens": 0, "total_tokens": 0},
"conversation_id": "conv-xxxxxxxx"
}Save the returned
conversation_id— you need it to continue the session. See §3.