跳至內容
Influence
Esc
↑↓導覽↵開啟⌘J預覽

確認二進位圖片上傳

以原始 JPEG、PNG 或 WebP 位元組,確認已準備的 mediaImport 上傳描述物件(最多 3,145,728 位元組)。位元組長度與 SHA-256 必須符合描述物件。檔案參照或較大的本機檔案,請使用文件所述媒體工具與 SDK 分段傳輸流程。

POST/api/v1/media/import
授權
AuthorizationBearer 權杖 · header必要

使用 Influence 限定權限的 API 金鑰,或受支援的 OAuth 存取權杖。不要將憑證放在網址或工具輸入中。

標頭參數
X-Publish-ConfirmationConfirmationCapability必要

使用 prepare 傳回的確切 confirmationCapability。到 expiresAt 之前,僅透過此標頭傳送,並保持相同輸入。

長度下限:32 · 長度上限:4096 · 符合 ^[A-Za-z0-9._~-]+$
Idempotency-KeyIdempotencyKey必要

由呼叫端產生的重試識別值。回應不明確時,保留此金鑰、確認憑證及輸入。

長度下限:16 · 長度上限:200 · 符合 ^[A-Za-z0-9._:-]+$
X-Publish-Uploadstring必要

來自已準備 mediaImport 輸入的 encodeURIComponent(JSON.stringify(upload))。解碼物件須符合 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"
}