เอกสาร

เริ่มต้นด่วน

เริ่มต้นใช้งาน Renderful API ในไม่กี่นาที ทำตามขั้นตอนเหล่านี้เพื่อส่งคำขอ API แรกของคุณ

1. รับคีย์ API ของคุณ

Create an API key from the หน้าคีย์ API. Keep this key secure and never expose it in client-side code.

2. ส่งคำขอแรกของคุณ

curl -X POST https://api.renderful.ai/api/v1/generations \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "text-to-image",
    "model": "flux-dev",
    "prompt": "A beautiful sunset over mountains"
  }'

3. จัดการการตอบกลับ

{
  "id": "gen_abc123",
  "status": "processing",
  "model": "flux-dev",
  "created_at": "2024-01-15T10:30:00Z"
}

ตรวจสอบสถานะการสร้างหรือกำหนดค่าเว็บฮุกเพื่อรับการแจ้งเตือนเมื่อเสร็จสิ้น