Skip to content

Instantly share code, notes, and snippets.

@QiangF
Created March 25, 2026 14:17
Show Gist options
  • Select an option

  • Save QiangF/646fbd6f51057d5be4db48206a234765 to your computer and use it in GitHub Desktop.

Select an option

Save QiangF/646fbd6f51057d5be4db48206a234765 to your computer and use it in GitHub Desktop.
(setq gptel-stream nil)
{
"gptel": "request headers",
"timestamp": "2026-03-25 22:11:08"
}
{
"Content-Type": "application/json"
}
{
"gptel": "request body",
"timestamp": "2026-03-25 22:11:08"
}
{
"contents": [
{
"role": "user",
"parts": [
{
"text": "what is org-loaddefs.el used for in emacs"
}
]
}
],
"safetySettings": [
{
"category": "HARM_CATEGORY_HARASSMENT",
"threshold": "BLOCK_NONE"
},
{
"category": "HARM_CATEGORY_SEXUALLY_EXPLICIT",
"threshold": "BLOCK_NONE"
},
{
"category": "HARM_CATEGORY_DANGEROUS_CONTENT",
"threshold": "BLOCK_NONE"
},
{
"category": "HARM_CATEGORY_HATE_SPEECH",
"threshold": "BLOCK_NONE"
}
],
"systemInstruction": {
"parts": [
{
"text": "You are a large language model living in Emacs and a helpful assistant. Respond concisely."
}
]
},
"generationConfig": {
"temperature": 1.0,
"thinkingConfig": {
"includeThoughts": true
}
}
}
{"gptel": "request Curl command", "timestamp": "2026-03-25 22:11:08"}
curl \
--disable \
--location \
--silent \
--compressed \
-XPOST \
-y7200 \
-Y1 \
-D- \
-w\(ed4f7078a11b4c66f853cb29c2d989f7\ .\ \%\{size_header\}\) \
-d\{\"contents\"\:\[\{\"role\"\:\"user\"\,\"parts\"\:\[\{\"text\"\:\"what\ is\ org-loaddefs.el\ used\ for\ in\ emacs\"\}\]\}\]\,\"safetySettings\"\:\[\{\"category\"\:\"HARM_CATEGORY_HARASSMENT\"\,\"threshold\"\:\"BLOCK_NONE\"\}\,\{\"category\"\:\"HARM_CATEGORY_SEXUALLY_EXPLICIT\"\,\"threshold\"\:\"BLOCK_NONE\"\}\,\{\"category\"\:\"HARM_CATEGORY_DANGEROUS_CONTENT\"\,\"threshold\"\:\"BLOCK_NONE\"\}\,\{\"category\"\:\"HARM_CATEGORY_HATE_SPEECH\"\,\"threshold\"\:\"BLOCK_NONE\"\}\]\,\"systemInstruction\"\:\{\"parts\"\:\[\{\"text\"\:\"You\ are\ a\ large\ language\ model\ living\ in\ Emacs\ and\ a\ helpful\ assistant.\ Respond\ concisely.\"\}\]\}\,\"generationConfig\"\:\{\"temperature\"\:1.0\,\"thinkingConfig\"\:\{\"includeThoughts\"\:true\}\}\} \
--proxy \
127.0.0.1\:7890 \
--proxy-negotiate \
--proxy-user \
\: \
-HContent-Type\:\ application/json \
https\://generativelanguage.googleapis.com/v1beta/models/gemini-2.5-pro\:streamGenerateContent\?key\=secret
{
"gptel": "response headers",
"timestamp": "2026-03-25 22:11:08"
}
"HTTP/1.1 200 Connection established\r\n\r"
{
"gptel": "response body",
"timestamp": "2026-03-25 22:11:08"
}
HTTP/2 429
vary: Origin
vary: X-Origin
vary: Referer
content-type: application/json; charset=UTF-8
content-encoding: gzip
date: Wed, 25 Mar 2026 14:11:08 GMT
server: scaffolding on HTTPServer2
content-length: 651
x-xss-protection: 0
x-frame-options: SAMEORIGIN
x-content-type-options: nosniff
server-timing: gfet4t7; dur=99
alt-svc: h3=":443"; ma=2592000,h3-29=":443"; ma=2592000
[{
"error": {
"code": 429,
"message": "You exceeded your current quota, please check your plan and billing details. For more information on this error, head to: https://ai.google.dev/gemini-api/docs/rate-limits. To monitor your current usage, head to: https://ai.dev/rate-limit. \n* Quota exceeded for metric: generativelanguage.googleapis.com/generate_content_free_tier_input_token_count, limit: 0, model: gemini-2.5-pro\n* Quota exceeded for metric: generativelanguage.googleapis.com/generate_content_free_tier_requests, limit: 0, model: gemini-2.5-pro\n* Quota exceeded for metric: generativelanguage.googleapis.com/generate_content_free_tier_requests, limit: 0, model: gemini-2.5-pro\n* Quota exceeded for metric: generativelanguage.googleapis.com/generate_content_free_tier_input_token_count, limit: 0, model: gemini-2.5-pro\nPlease retry in 51.497436933s.",
"status": "RESOURCE_EXHAUSTED",
"details": [
{
"@type": "type.googleapis.com/google.rpc.Help",
"links": [
{
"description": "Learn more about Gemini API quotas",
"url": "https://ai.google.dev/gemini-api/docs/rate-limits"
}
]
},
{
"@type": "type.googleapis.com/google.rpc.QuotaFailure",
"violations": [
{
"quotaMetric": "generativelanguage.googleapis.com/generate_content_free_tier_input_token_count",
"quotaId": "GenerateContentInputTokensPerModelPerMinute-FreeTier",
"quotaDimensions": {
"model": "gemini-2.5-pro",
"location": "global"
}
},
{
"quotaMetric": "generativelanguage.googleapis.com/generate_content_free_tier_requests",
"quotaId": "GenerateRequestsPerMinutePerProjectPerModel-FreeTier",
"quotaDimensions": {
"location": "global",
"model": "gemini-2.5-pro"
}
},
{
"quotaMetric": "generativelanguage.googleapis.com/generate_content_free_tier_requests",
"quotaId": "GenerateRequestsPerDayPerProjectPerModel-FreeTier",
"quotaDimensions": {
"model": "gemini-2.5-pro",
"location": "global"
}
},
{
"quotaMetric": "generativelanguage.googleapis.com/generate_content_free_tier_input_token_count",
"quotaId": "GenerateContentInputTokensPerModelPerDay-FreeTier",
"quotaDimensions": {
"model": "gemini-2.5-pro",
"location": "global"
}
}
]
},
{
"@type": "type.googleapis.com/google.rpc.RetryInfo",
"retryDelay": "51s"
}
]
}
}
]
{
"gptel": "request headers",
"timestamp": "2026-03-25 22:13:41"
}
{
"Content-Type": "application/json"
}
{
"gptel": "request body",
"timestamp": "2026-03-25 22:13:41"
}
{
"contents": [
{
"role": "user",
"parts": [
{
"text": "what is org-loaddefs.el used for in emacs"
}
]
}
],
"safetySettings": [
{
"category": "HARM_CATEGORY_HARASSMENT",
"threshold": "BLOCK_NONE"
},
{
"category": "HARM_CATEGORY_SEXUALLY_EXPLICIT",
"threshold": "BLOCK_NONE"
},
{
"category": "HARM_CATEGORY_DANGEROUS_CONTENT",
"threshold": "BLOCK_NONE"
},
{
"category": "HARM_CATEGORY_HATE_SPEECH",
"threshold": "BLOCK_NONE"
}
],
"systemInstruction": {
"parts": [
{
"text": "You are a large language model living in Emacs and a helpful assistant. Respond concisely."
}
]
},
"generationConfig": {
"temperature": 1.0,
"thinkingConfig": {
"includeThoughts": true
}
}
}
{"gptel": "request Curl command", "timestamp": "2026-03-25 22:13:41"}
curl \
--disable \
--location \
--silent \
--compressed \
-XPOST \
-y7200 \
-Y1 \
-D- \
-w\(7448bad2d54753faca25d03a5e2e1623\ .\ \%\{size_header\}\) \
-d\{\"contents\"\:\[\{\"role\"\:\"user\"\,\"parts\"\:\[\{\"text\"\:\"what\ is\ org-loaddefs.el\ used\ for\ in\ emacs\"\}\]\}\]\,\"safetySettings\"\:\[\{\"category\"\:\"HARM_CATEGORY_HARASSMENT\"\,\"threshold\"\:\"BLOCK_NONE\"\}\,\{\"category\"\:\"HARM_CATEGORY_SEXUALLY_EXPLICIT\"\,\"threshold\"\:\"BLOCK_NONE\"\}\,\{\"category\"\:\"HARM_CATEGORY_DANGEROUS_CONTENT\"\,\"threshold\"\:\"BLOCK_NONE\"\}\,\{\"category\"\:\"HARM_CATEGORY_HATE_SPEECH\"\,\"threshold\"\:\"BLOCK_NONE\"\}\]\,\"systemInstruction\"\:\{\"parts\"\:\[\{\"text\"\:\"You\ are\ a\ large\ language\ model\ living\ in\ Emacs\ and\ a\ helpful\ assistant.\ Respond\ concisely.\"\}\]\}\,\"generationConfig\"\:\{\"temperature\"\:1.0\,\"thinkingConfig\"\:\{\"includeThoughts\"\:true\}\}\} \
--proxy \
127.0.0.1\:7890 \
--proxy-negotiate \
--proxy-user \
\: \
-HContent-Type\:\ application/json \
https\://generativelanguage.googleapis.com/v1beta/models/gemini-2.5-pro\:generateContent\?key\secret
{
"gptel": "response headers",
"timestamp": "2026-03-25 22:13:42"
}
"HTTP/1.1 200 Connection established\r\n\r"
{
"gptel": "response body",
"timestamp": "2026-03-25 22:13:42"
}
HTTP/2 429
x-gemini-service-tier: standard
vary: Origin
vary: X-Origin
vary: Referer
content-type: application/json; charset=UTF-8
content-encoding: gzip
date: Wed, 25 Mar 2026 14:13:42 GMT
server: scaffolding on HTTPServer2
content-length: 643
x-xss-protection: 0
x-frame-options: SAMEORIGIN
x-content-type-options: nosniff
server-timing: gfet4t7; dur=93
alt-svc: h3=":443"; ma=2592000,h3-29=":443"; ma=2592000
{
"error": {
"code": 429,
"message": "You exceeded your current quota, please check your plan and billing details. For more information on this error, head to: https://ai.google.dev/gemini-api/docs/rate-limits. To monitor your current usage, head to: https://ai.dev/rate-limit. \n* Quota exceeded for metric: generativelanguage.googleapis.com/generate_content_free_tier_requests, limit: 0, model: gemini-2.5-pro\n* Quota exceeded for metric: generativelanguage.googleapis.com/generate_content_free_tier_requests, limit: 0, model: gemini-2.5-pro\n* Quota exceeded for metric: generativelanguage.googleapis.com/generate_content_free_tier_input_token_count, limit: 0, model: gemini-2.5-pro\n* Quota exceeded for metric: generativelanguage.googleapis.com/generate_content_free_tier_input_token_count, limit: 0, model: gemini-2.5-pro\nPlease retry in 17.840796228s.",
"status": "RESOURCE_EXHAUSTED",
"details": [
{
"@type": "type.googleapis.com/google.rpc.Help",
"links": [
{
"description": "Learn more about Gemini API quotas",
"url": "https://ai.google.dev/gemini-api/docs/rate-limits"
}
]
},
{
"@type": "type.googleapis.com/google.rpc.QuotaFailure",
"violations": [
{
"quotaMetric": "generativelanguage.googleapis.com/generate_content_free_tier_requests",
"quotaId": "GenerateRequestsPerDayPerProjectPerModel-FreeTier",
"quotaDimensions": {
"location": "global",
"model": "gemini-2.5-pro"
}
},
{
"quotaMetric": "generativelanguage.googleapis.com/generate_content_free_tier_requests",
"quotaId": "GenerateRequestsPerMinutePerProjectPerModel-FreeTier",
"quotaDimensions": {
"location": "global",
"model": "gemini-2.5-pro"
}
},
{
"quotaMetric": "generativelanguage.googleapis.com/generate_content_free_tier_input_token_count",
"quotaId": "GenerateContentInputTokensPerModelPerMinute-FreeTier",
"quotaDimensions": {
"model": "gemini-2.5-pro",
"location": "global"
}
},
{
"quotaMetric": "generativelanguage.googleapis.com/generate_content_free_tier_input_token_count",
"quotaId": "GenerateContentInputTokensPerModelPerDay-FreeTier",
"quotaDimensions": {
"location": "global",
"model": "gemini-2.5-pro"
}
}
]
},
{
"@type": "type.googleapis.com/google.rpc.RetryInfo",
"retryDelay": "17s"
}
]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment