{"status":"success","item":{"id":4,"slug":"openai-cookbook-openai-openai-cookbook-readme-md","label":"OpenAI Cookbook","repository_full_name":"openai/openai-cookbook","resource_kind":"playbook","category":"llm-building","source_path":"README.md","repo_url":"https://github.com/openai/openai-cookbook","raw_url":"https://raw.githubusercontent.com/openai/openai-cookbook/main/README.md","portal_url":"/github-library/openai-cookbook-openai-openai-cookbook-readme-md/","summary":"✨ Navigate at cookbook.openai.com","excerpt":"✨ Navigate at cookbook.openai.com Example code and guides for accomplishing common tasks with the OpenAI API. To run these examples, you'll need an OpenAI account and associated API key (create a free account here). Set an environment variable called OPENAI_API_KEY with your API key. Alternatively, in most IDEs such as Visual Studio Code, you can create an .env file at the root of your repo containing OPENAI_API_KEY= , which will be picked up by the notebooks.","promotion_angle":"拿来补 API 教程、Prompt 模板和上手案例。","default_branch":"main","stars":72931,"forks":12305,"open_issues":142,"pushed_at":"2026-04-23T01:45:25+08:00","last_synced_at":"2026-04-24T08:30:27.787969+08:00","sync_status":"synced","sync_error":"","is_featured":true,"is_favorite":false,"publish_queue_status":"backlog","publish_target":"article","queue_priority":0,"operator_notes":"","metadata":{"description":"Examples and guides for using the OpenAI API","language":"Jupyter Notebook","topics":["chatgpt","gpt-4","openai","openai-api"],"license":"MIT","homepage":"https://cookbook.openai.com","source_preview":"<a href=\"https://cookbook.openai.com\" target=\"_blank\">\n  <picture>\n    <source media=\"(prefers-color-scheme: dark)\" srcset=\"/images/openai-cookbook-white.png\" style=\"max-width: 100%; width: 400px; margin-bottom: 20px\">\n    <img alt=\"OpenAI Cookbook Logo\" src=\"/images/openai-cookbook.png\" width=\"400px\">\n  </picture>\n</a>\n\n<h3></h3>\n\n> ✨ Navigate at [cookbook.openai.com](https://cookbook.openai.com)\n\nExample code and guides for accomplishing common tasks with the [OpenAI API](https://platform.openai.com/docs/introduction). To run these examples, you'll need an OpenAI account and associated API key ([create a free account here](https://p\n\nMost code examples are written in Python, though the concepts can be applied in any language.\n\nFor other useful tools, guides and courses, check out these [related resources from around the web](https://cookbook.openai.com/related_resources).\n\n## License\n\nMIT License","site_use_cases":["API 教程","Prompt 模板","模型上手页"],"suggested_formats":["专题聚合页","方法论教程","对比清单"],"channel_plan":["wechat","x","topic_update"]}}}