AI on demand: google/gemma-4-31B-it
Jump to navigation
Jump to search
Calling the model
# Set your personal key:
STONEY_KEY=sk-...
# Set the desired model:
MODEL=google/gemma-4-31B-it
# Set your prompt:
PROMPT='Hello.'
# Set maximum amount of tokens:
MAX_TOKENS=1000
curl https://llm.stoney-cloud.com/v1/chat/completions \
--silent --fail --show-error \
--header "Authorization: Bearer $STONEY_KEY" \
--header 'Content-Type: application/json' \
--data '{
"model": "'"$MODEL"'",
"messages": [
{"role": "user", "content": "'"$PROMPT"'"}
],
"max_tokens": '"$MAX_TOKENS"'
}' \
| jq
Example output:
{
"id": "chatcmpl-b0f2f7e9a94d7216",
"object": "chat.completion",
"created": 1789132182,
"model": "google/gemma-4-31B-it",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "Hello! How can I help you today?",
"refusal": null,
"annotations": null,
"audio": null,
"function_call": null,
"reasoning": null
},
"logprobs": null,
"finish_reason": "stop",
"stop_reason": 106,
"token_ids": null,
"routed_experts": null
}
],
"service_tier": null,
"system_fingerprint": "vllm-0.28.0-4f0e9c70",
"usage": {
"prompt_tokens": 15,
"total_tokens": 25,
"completion_tokens": 10,
"prompt_tokens_details": null,
"completion_tokens_details": {
"reasoning_tokens": 0
}
},
"prompt_logprobs": null,
"prompt_token_ids": null,
"prompt_text": null,
"kv_transfer_params": null,
"ec_transfer_params": null,
"metrics": null
}