ข้ามไปยังเนื้อหา
Influence
Esc
↑↓นำทาง↵เปิด⌘Jดูตัวอย่าง

ยืนยันการอัปโหลดภาพแบบไบนารี

ยืนยันรายละเอียดการอัปโหลดที่เตรียมด้วย mediaImport โดยส่งไบต์ JPEG, PNG หรือ WebP ต้นฉบับ (ไม่เกิน 3,145,728 ไบต์) ขนาดและ SHA-256 ต้องตรงกับรายละเอียดที่เตรียมไว้ สำหรับการอ้างอิงไฟล์หรือไฟล์ในเครื่องที่ใหญ่กว่า ให้ใช้เครื่องมือสื่อและขั้นตอนอัปโหลดแบบแบ่งส่วนของ SDK ตามเอกสาร

POST/api/v1/media/import
การอนุญาตสิทธิ์
Authorizationโทเค็น Bearer · headerจำเป็น

ใช้คีย์ API ของ Influence ที่กำหนดขอบเขตสิทธิ์ หรือโทเค็นการเข้าถึง OAuth ที่รองรับ ห้ามใส่ข้อมูลยืนยันตัวตนใน URL หรือข้อมูลนำเข้าของเครื่องมือ

พารามิเตอร์ส่วนหัว
X-Publish-ConfirmationConfirmationCapabilityจำเป็น

ค่า confirmationCapability ตรงตามที่ prepare ส่งคืน ส่งเฉพาะในส่วนหัวนี้พร้อมข้อมูลนำเข้าเดิมก่อน expiresAt

ความยาวต่ำสุด 32 · ความยาวสูงสุด 4096 · ตรงกับ ^[A-Za-z0-9._~-]+$
Idempotency-KeyIdempotencyKeyจำเป็น

รหัสสำหรับลองซ้ำที่ไคลเอนต์สร้าง หากผลลัพธ์ยังไม่แน่นอน ให้เก็บคีย์ สิทธิ์ยืนยัน และข้อมูลนำเข้าเดิมไว้

ความยาวต่ำสุด 16 · ความยาวสูงสุด 200 · ตรงกับ ^[A-Za-z0-9._:-]+$
X-Publish-Uploadstringจำเป็น

encodeURIComponent(JSON.stringify(upload)) จากข้อมูล mediaImport ที่เตรียมไว้ ออบเจ็กต์ที่ถอดรหัสแล้วต้องตรงตาม BinaryUploadDescriptor ส่วนหัวที่เข้ารหัสมีได้ไม่เกิน 4,096 อักขระ

ความยาวสูงสุด 4096
เนื้อหาคำขอ
จำเป็นapplication/octet-stream
string<binary>
การตอบกลับ
200

ผลลัพธ์สื่อ โปรดตรวจสอบ ok และสถานะไฟล์

เพียงหนึ่งรายการจาก:
object
okbooleanจำเป็น
outputJsonValue | nullจำเป็น
แสดงพร็อพเพอร์ตี
อย่างน้อยหนึ่งรายการจาก:
string
string
number
number
boolean
boolean
null
null
JsonValue[]
อาร์เรย์ของ JsonValue
การอ้างอิงวนกลับไปยัง JsonValue
object
object
toolNamestringจำเป็น
ค่าที่อนุญาต:adAuditQuoteadAuditStartadAuditGetadAuditListsearchfetchprofileGetconnectionStatusGetaccountListcampaignGetcampaignListcampaignDraftSavemediaListmediaImportmediaUploadCreatemediaUploadPartmediaUploadCompletemediaUploadGetmediaUploadAbortmediaGetcampaignReviewcampaignReviewGetcampaignReviewExecutecampaignScheduleBatchReviewcampaignScheduleBatchExecutescheduleListbrandContextGetinsightsAccountListinsightsPostListinsightsRefreshcampaignPlanGetcampaignPlanGenerateimageGenerationQuoteimageGenerationStartimageGenerationListintegrationListgroupListintegrationSchemadevtoOrganizationListdevtoTagListdiscordChannelListdiscourseCategoryListdiscourseTagListdiscourseTopicSearchdribbbleTeamListghostAuthorListghostNewsletterListghostTagListghostTierListhashnodePublicationListlemmyCommunitySearchlistmonkListsGetlistmonkTemplateListmattermostChannelListmeweGroupListpinterestBoardListredditSubredditRequirementsGetredditSubredditSearchslackChannelListteamsChannelListtiktokCreatorInfoGetvkDestinationListwhopCompanyListwhopExperienceListwordpressCategoryListwordpressPostTypeListwordpressTagListwrapcastChannelSearchintegrationSchedulePostToolpostsListToolpostSettingsTool
ToolError
errorobjectจำเป็น
แสดงพร็อพเพอร์ตี
codestringจำเป็น
ค่าที่อนุญาต:AI_SCHEDULING_LIMIT_REACHEDAI_SCHEDULING_UNAVAILABLEINVALID_INPUTFORBIDDENNOT_FOUNDCONFLICTFEATURE_DISABLEDCONFIRMATION_REQUIREDCONFIRMATION_INVALIDUPSTREAM_FAILEDNEEDS_REVIEWINTERNAL
messagestringจำเป็น
ความยาวต่ำสุด 1 · ความยาวสูงสุด 2048
retryablebooleanจำเป็น
okbooleanจำเป็น
toolNamestringจำเป็น
ค่าที่อนุญาต:adAuditQuoteadAuditStartadAuditGetadAuditListsearchfetchprofileGetconnectionStatusGetaccountListcampaignGetcampaignListcampaignDraftSavemediaListmediaImportmediaUploadCreatemediaUploadPartmediaUploadCompletemediaUploadGetmediaUploadAbortmediaGetcampaignReviewcampaignReviewGetcampaignReviewExecutecampaignScheduleBatchReviewcampaignScheduleBatchExecutescheduleListbrandContextGetinsightsAccountListinsightsPostListinsightsRefreshcampaignPlanGetcampaignPlanGenerateimageGenerationQuoteimageGenerationStartimageGenerationListintegrationListgroupListintegrationSchemadevtoOrganizationListdevtoTagListdiscordChannelListdiscourseCategoryListdiscourseTagListdiscourseTopicSearchdribbbleTeamListghostAuthorListghostNewsletterListghostTagListghostTierListhashnodePublicationListlemmyCommunitySearchlistmonkListsGetlistmonkTemplateListmattermostChannelListmeweGroupListpinterestBoardListredditSubredditRequirementsGetredditSubredditSearchslackChannelListteamsChannelListtiktokCreatorInfoGetvkDestinationListwhopCompanyListwhopExperienceListwordpressCategoryListwordpressPostTypeListwordpressTagListwrapcastChannelSearchintegrationSchedulePostToolpostsListToolpostSettingsTool
400

คำขอไม่ถูกต้อง ไม่รับพารามิเตอร์คิวรี หากตรวจสอบข้อมูลไม่ผ่าน อาจส่งคืนข้อผิดพลาดในรูปแบบของเครื่องมือ

อย่างน้อยหนึ่งรายการจาก:
TransportError
errorobjectจำเป็น
แสดงพร็อพเพอร์ตี
codestringจำเป็น
messagestringจำเป็น
retryablebooleanจำเป็น
ToolError
errorobjectจำเป็น
แสดงพร็อพเพอร์ตี
codestringจำเป็น
ค่าที่อนุญาต:AI_SCHEDULING_LIMIT_REACHEDAI_SCHEDULING_UNAVAILABLEINVALID_INPUTFORBIDDENNOT_FOUNDCONFLICTFEATURE_DISABLEDCONFIRMATION_REQUIREDCONFIRMATION_INVALIDUPSTREAM_FAILEDNEEDS_REVIEWINTERNAL
messagestringจำเป็น
ความยาวต่ำสุด 1 · ความยาวสูงสุด 2048
retryablebooleanจำเป็น
okbooleanจำเป็น
toolNamestringจำเป็น
ค่าที่อนุญาต:adAuditQuoteadAuditStartadAuditGetadAuditListsearchfetchprofileGetconnectionStatusGetaccountListcampaignGetcampaignListcampaignDraftSavemediaListmediaImportmediaUploadCreatemediaUploadPartmediaUploadCompletemediaUploadGetmediaUploadAbortmediaGetcampaignReviewcampaignReviewGetcampaignReviewExecutecampaignScheduleBatchReviewcampaignScheduleBatchExecutescheduleListbrandContextGetinsightsAccountListinsightsPostListinsightsRefreshcampaignPlanGetcampaignPlanGenerateimageGenerationQuoteimageGenerationStartimageGenerationListintegrationListgroupListintegrationSchemadevtoOrganizationListdevtoTagListdiscordChannelListdiscourseCategoryListdiscourseTagListdiscourseTopicSearchdribbbleTeamListghostAuthorListghostNewsletterListghostTagListghostTierListhashnodePublicationListlemmyCommunitySearchlistmonkListsGetlistmonkTemplateListmattermostChannelListmeweGroupListpinterestBoardListredditSubredditRequirementsGetredditSubredditSearchslackChannelListteamsChannelListtiktokCreatorInfoGetvkDestinationListwhopCompanyListwhopExperienceListwordpressCategoryListwordpressPostTypeListwordpressTagListwrapcastChannelSearchintegrationSchedulePostToolpostsListToolpostSettingsTool
401

ไม่มีข้อมูลยืนยันตัวตนแบบ bearer หรือข้อมูลไม่ถูกต้องหรือหมดอายุ

errorobjectจำเป็น
แสดงพร็อพเพอร์ตี
codestringจำเป็น
messagestringจำเป็น
retryablebooleanจำเป็น
403

ข้อมูลยืนยันตัวตนไม่มีสิทธิ์ที่จำเป็น

errorobjectจำเป็น
แสดงพร็อพเพอร์ตี
codestringจำเป็น
messagestringจำเป็น
retryablebooleanจำเป็น
404

API หรือเครื่องมือที่ขอไม่พร้อมใช้งาน

errorobjectจำเป็น
แสดงพร็อพเพอร์ตี
codestringจำเป็น
messagestringจำเป็น
retryablebooleanจำเป็น
413

คำขอมีขนาดเกินจำนวนไบต์ที่กำหนด

errorobjectจำเป็น
แสดงพร็อพเพอร์ตี
codestringจำเป็น
ค่าที่อนุญาต:AI_SCHEDULING_LIMIT_REACHEDAI_SCHEDULING_UNAVAILABLEINVALID_INPUTFORBIDDENNOT_FOUNDCONFLICTFEATURE_DISABLEDCONFIRMATION_REQUIREDCONFIRMATION_INVALIDUPSTREAM_FAILEDNEEDS_REVIEWINTERNAL
messagestringจำเป็น
ความยาวต่ำสุด 1 · ความยาวสูงสุด 2048
retryablebooleanจำเป็น
okbooleanจำเป็น
toolNamestringจำเป็น
ค่าที่อนุญาต:adAuditQuoteadAuditStartadAuditGetadAuditListsearchfetchprofileGetconnectionStatusGetaccountListcampaignGetcampaignListcampaignDraftSavemediaListmediaImportmediaUploadCreatemediaUploadPartmediaUploadCompletemediaUploadGetmediaUploadAbortmediaGetcampaignReviewcampaignReviewGetcampaignReviewExecutecampaignScheduleBatchReviewcampaignScheduleBatchExecutescheduleListbrandContextGetinsightsAccountListinsightsPostListinsightsRefreshcampaignPlanGetcampaignPlanGenerateimageGenerationQuoteimageGenerationStartimageGenerationListintegrationListgroupListintegrationSchemadevtoOrganizationListdevtoTagListdiscordChannelListdiscourseCategoryListdiscourseTagListdiscourseTopicSearchdribbbleTeamListghostAuthorListghostNewsletterListghostTagListghostTierListhashnodePublicationListlemmyCommunitySearchlistmonkListsGetlistmonkTemplateListmattermostChannelListmeweGroupListpinterestBoardListredditSubredditRequirementsGetredditSubredditSearchslackChannelListteamsChannelListtiktokCreatorInfoGetvkDestinationListwhopCompanyListwhopExperienceListwordpressCategoryListwordpressPostTypeListwordpressTagListwrapcastChannelSearchintegrationSchedulePostToolpostsListToolpostSettingsTool
429

เกินขีดจำกัดคำขอ สามารถลองใหม่ได้

errorobjectจำเป็น
แสดงพร็อพเพอร์ตี
codestringจำเป็น
messagestringจำเป็น
retryablebooleanจำเป็น
503

API หรือบริการที่ประมวลผลคำขอไม่พร้อมใช้งาน

errorobjectจำเป็น
แสดงพร็อพเพอร์ตี
codestringจำเป็น
messagestringจำเป็น
retryablebooleanจำเป็น
คำขอ
curl -X POST 'https://influence.so/api/v1/media/import' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'X-Publish-Confirmation: stringstringstringstringstringst' \
  -H 'Idempotency-Key: stringstringstri' \
  -H 'X-Publish-Upload: string' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/octet-stream' \
  -d 'string'
การตอบกลับ
{
  "ok": true,
  "output": "string",
  "toolName": "adAuditQuote"
}