{"id":9655,"date":"2024-05-18T21:31:50","date_gmt":"2024-05-18T19:31:50","guid":{"rendered":"https:\/\/www.kubicek.ai\/?p=9655"},"modified":"2026-07-28T09:58:43","modified_gmt":"2026-07-28T07:58:43","slug":"how-to-set-the-temperature-parameter-for-api-requests","status":"publish","type":"post","link":"https:\/\/www.kubicek.ai\/en\/how-to-set-the-temperature-parameter-for-api-requests\/","title":{"rendered":"How to Set the Temperature Parameter for API Requests"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">If you send your requests to tools such as ChatGPT, Claude or Gemini through an API, one of the values you supply is the &#8220;temperature&#8221; parameter. It controls how creative and how variable the model\u2019s answers will be. The parameter determines how individual tokens (words or parts of words) are picked while the text is being generated. <a href=\"https:\/\/www.kubicek.ai\/en\/lexicon\/temperature\/\" class=\"lex-link\">Temperature<\/a> can take a value between 0 and 1, where:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>A low value (close to 0):<\/strong> The model produces conservative, more predictable answers. <a href=\"https:\/\/www.kubicek.ai\/en\/lexicon\/token\/\" class=\"lex-link\">Token<\/a> selection is more deterministic, meaning the model favours the most probable options. A value of 0.1, for example, will make the model write very consistent and rather uncreative text.<\/li>\n\n\n\n<li><strong>A high value (close to 1):<\/strong> The model produces more creative and more varied answers. Token selection is more random, meaning the model will more often reach for less probable options. A value of 0.9, for example, will make the model write more variable and less predictable text.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Examples of use:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Value 0.7:<\/strong> This middle setting is used very often, because it offers a good compromise between creative and consistent answers. The model is creative enough to produce interesting text while keeping a certain level of consistency and relevance.<\/li>\n\n\n\n<li><strong>Value 1.0:<\/strong> For when you want maximum creativity and accept a higher risk of answers that make less sense. In this mode the model experiments more and may produce original but occasionally incoherent or nonsensical text.<\/li>\n\n\n\n<li><strong>Value 0.0:<\/strong> When you need the most accurate and most predictable answer possible, use a value close to 0. The model will stick strictly to the most probable options, which leads to less creative but very consistent results.<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>If you send your requests to tools such as ChatGPT, Claude or Gemini through an API, one of the values you supply is the &#8220;temperature&#8221; parameter. It controls how creative and how variable the model\u2019s answers will be. The parameter determines how individual tokens (words or parts of words) are picked while the text is [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":833,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_seopress_titles_title":"","_seopress_titles_desc":"","_seopress_robots_index":"","_seopress_robots_follow":"","_seopress_robots_imageindex":"","_seopress_robots_snippet":"","_seopress_robots_primary_cat":"","_seopress_robots_breadcrumbs":"","_seopress_robots_freeze_modified_date":"","_seopress_robots_custom_modified_date":"","_seopress_robots_canonical":"","_seopress_social_fb_title":"","_seopress_social_fb_desc":"","_seopress_social_fb_img":"","_seopress_social_fb_img_attachment_id":0,"_seopress_social_fb_img_width":0,"_seopress_social_fb_img_height":0,"_seopress_social_twitter_title":"","_seopress_social_twitter_desc":"","_seopress_social_twitter_img":"","_seopress_social_twitter_img_attachment_id":0,"_seopress_social_twitter_img_width":0,"_seopress_social_twitter_img_height":0,"_seopress_redirections_value":"","_seopress_redirections_enabled":"","_seopress_redirections_enabled_regex":"","_seopress_redirections_logged_status":"","_seopress_redirections_param":"","_seopress_redirections_type":0,"_seopress_analysis_target_kw":"","_seopress_news_disabled":"","_seopress_video_disabled":"","_seopress_video":[],"_seopress_pro_schemas_manual":[],"_seopress_pro_rich_snippets_disable_all":"","_seopress_pro_rich_snippets_disable":[],"_seopress_pro_schemas":[],"footnotes":""},"categories":[10],"tags":[],"cat_tool":[],"class_list":["post-9655","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.kubicek.ai\/en\/wp-json\/wp\/v2\/posts\/9655","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.kubicek.ai\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.kubicek.ai\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.kubicek.ai\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.kubicek.ai\/en\/wp-json\/wp\/v2\/comments?post=9655"}],"version-history":[{"count":2,"href":"https:\/\/www.kubicek.ai\/en\/wp-json\/wp\/v2\/posts\/9655\/revisions"}],"predecessor-version":[{"id":9831,"href":"https:\/\/www.kubicek.ai\/en\/wp-json\/wp\/v2\/posts\/9655\/revisions\/9831"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.kubicek.ai\/en\/wp-json\/wp\/v2\/media\/833"}],"wp:attachment":[{"href":"https:\/\/www.kubicek.ai\/en\/wp-json\/wp\/v2\/media?parent=9655"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.kubicek.ai\/en\/wp-json\/wp\/v2\/categories?post=9655"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.kubicek.ai\/en\/wp-json\/wp\/v2\/tags?post=9655"},{"taxonomy":"cat_tool","embeddable":true,"href":"https:\/\/www.kubicek.ai\/en\/wp-json\/wp\/v2\/cat_tool?post=9655"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}