// https://ai.google.dev/api/generate-content?hl=zh-cn#text
{
"model": "gemini-2.0-flash",
"cached_content": "cached content",
"contents": [
{
"role": "user",
"parts": [
{
"text": "Hello, please introduce yourself"
}
]
}
],
"system_instruction": {
"role": "system",
"parts": [
{
"text": "You are a helpful AI assistant"
}
]
},
"tools": [],
"safety_settings": [
{
"category": "HARM_CATEGORY_HARASSMENT",
"threshold": "BLOCK_MEDIUM_AND_ABOVE"
}
],
"generation_config": {
"thinking_config": {
"include_thoughts": false,
"thinking_budget": 1000
},
"max_output_tokens": 4096,
"response_modalities": null,
"temperature": 1.8,
"top_p": 0.8,
"top_k": 40,
"candidate_count": 1,
"presence_penalty": 0.0,
"frequency_penalty": 0.0,
"stop_sequences": [
"END",
"STOP"
],
"response_mime_type": "text/plain",
"response_schema": null,
"seed": 12345,
"response_logprobs": false,
"logprobs": null,
"audio_timestamp": false
},
"stream": false,
"labels": {
"user_id": "12345",
"session_id": "session_001"
}
}
curl --location --request POST 'https://gptproto.com/v1beta/models/:generateContent?key=sk-****************' \
--header 'Content-Type: application/json' \
--data-raw '// https://ai.google.dev/api/generate-content?hl=zh-cn#text
{
"model": "gemini-2.0-flash",
"cached_content": "cached content",
"contents": [
{
"role": "user",
"parts": [
{
"text": "Hello, please introduce yourself"
}
]
}
],
"system_instruction": {
"role": "system",
"parts": [
{
"text": "You are a helpful AI assistant"
}
]
},
"tools": [],
"safety_settings": [
{
"category": "HARM_CATEGORY_HARASSMENT",
"threshold": "BLOCK_MEDIUM_AND_ABOVE"
}
],
"generation_config": {
"thinking_config": {
"include_thoughts": false,
"thinking_budget": 1000
},
"max_output_tokens": 4096,
"response_modalities": null,
"temperature": 1.8,
"top_p": 0.8,
"top_k": 40,
"candidate_count": 1,
"presence_penalty": 0.0,
"frequency_penalty": 0.0,
"stop_sequences": [
"END",
"STOP"
],
"response_mime_type": "text/plain",
"response_schema": null,
"seed": 12345,
"response_logprobs": false,
"logprobs": null,
"audio_timestamp": false
},
"stream": false,
"labels": {
"user_id": "12345",
"session_id": "session_001"
}
}'
{
"id": "claude-completion-11111",
"type": "text_completion",
"role": "assistant",
"content": [
{
"type": "text",
"text": "Here's a summary of the key points:"
},
{
"type": "text",
"text": "1. First point\n2. Second point\n3. Third point"
}
],
"model": "claude-3-opus-20240229",
"stop_sequence": null,
"stop_reason": "end_turn",
"usage": {
"input_tokens": 150,
"output_tokens": 89
}
}