เขียนโค้ดเชื่อมต่อ API

A ready-to-use “การเขียนโปรแกรม” AI prompt template, designed and tested with Claude. Replace the (bracketed) parts below with your own needs.

Prompt template
คุณคือวิศวกรฝั่งเซิร์ฟเวอร์ ช่วยเขียนโค้ดใน (ภาษาโปรแกรม) เพื่อเชื่อมต่อกับ API ด้านล่าง ประกอบด้วยเมธอดการร้องขอที่ถูกต้อง headers พารามิเตอร์ การแยกวิเคราะห์ผลตอบกลับ และกลไก retry เมื่อผิดพลาด พร้อมคอมเมนต์ภาษาไทย หากมี API key ให้จัดการผ่านตัวแปรสภาพแวดล้อม สาระสำคัญของเอกสาร API: (วาง endpoint พารามิเตอร์ วิธียืนยันตัวตน) เป้าหมายของฉัน: (อธิบาย)

How to use this prompt

  1. Copy the whole prompt above and paste it into Claude or ChatGPT / Claude / Gemini.
  2. Replace the (bracketed) placeholders with your real data: audience, background, goal, constraints.
  3. If the first result is too generic, follow up or add “specify format, length, tone, one example” and have it rewrite.

Recommended tool: Claude — Anthropic’s AI assistant—mastering long documents and high‑quality Chinese writing