{"items":[{"type":"link","label":"檔案管理","link":"/zh-tw/reference/file","routeSlug":"/zh-tw/reference/file","content":{"contentType":"overview","meta":{"name":"檔案管理"},"children":[{"nodeType":"container","panels":[{"title":"Download OpenAPI description","titleTranslationKey":"download.description.title","children":[{"kind":"download","label":"file.json","url":"/_bundle/@l10n/zh-TW/reference/file.json?download"},{"kind":"download","label":"file.yaml","url":"/_bundle/@l10n/zh-TW/reference/file.yaml?download"}]},{"title":"Overview","titleTranslationKey":"info.title","children":[{"kind":"email","title":"E-mail","titleTranslationKey":"info.contact.name","email":"YouCamOnlineEditor_API@perfectcorp.com","label":"YouCamOnlineEditor_API@perfectcorp.com","withCopyButton":true,"copyContent":"YouCamOnlineEditor_API@perfectcorp.com"},{"kind":"externallink","title":"License","titleTranslationKey":"info.license","label":"Privacy policy","url":"https://www.makeupar.com/perfectbeauty/youcam/privacy-policy-api"},{"kind":"externallink","label":"Terms of Service","labelTranslationKey":"info.termsOfService","url":"https://www.makeupar.com/perfectbeauty/youcam/terms-of-service-api"}]},{"title":"Languages","titleTranslationKey":"languages.title","children":[{"kind":"languages","options":[{"key":"curl","title":"curl","lang":"curl"},{"key":"javascript","title":"JavaScript","lang":"JavaScript"},{"key":"node","title":"Node.js","lang":"Node.js"},{"key":"python","title":"Python","lang":"Python"},{"key":"java","title":"Java","lang":"Java"},{"key":"csharp","title":"C#","lang":"C#"},{"key":"php","title":"PHP","lang":"PHP"},{"key":"go","title":"Go","lang":"Go"},{"key":"ruby","title":"Ruby","lang":"Ruby"},{"key":"r","title":"R","lang":"R"},{"key":"payload","title":"Payload","lang":"Payload"}]}]},{"title":"Servers","titleTranslationKey":"servers.title","children":[{"kind":"servers","servers":[{"url":"https://yce-api-01.makeupar.com"}],"mode":"default"}]}],"children":[{"nodeType":"overview-section-wrapper","children":[{"nodeType":"header","level":1,"label":"檔案管理","showPageActions":true}],"sectionId":"/"}]}]}},{"label":"建立新檔案。","deprecated":false,"httpVerb":"post","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/zh-tw/reference/file/paths/~1s2s~1v2.0~1file/post","routeSlug":"/zh-tw/reference/file/paths/~1s2s~1v2.0~1file/post","metadata":{"seo":{"title":"建立新檔案。","description":"要上傳新檔案，您必須先使用 File API。它會提供一個網址——請使用該網址上傳您的檔案。上傳完成後，您可以使用同一個回應中的 file_id，開始使用我們的 AI 功能。"}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"name":"建立新檔案。","isWebhook":false,"pointer":"/paths/~1s2s~1v2.0~1file/post","hasSamples":true},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"建立新檔案。","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"要上傳新檔案，您必須先使用 File API。它會提供一個網址——請使用該網址上傳您的檔案。上傳完成後，您可以使用同一個回應中的 file_id，開始使用我們的 AI 功能。"},"children":[],"type":"text"}],"type":"paragraph"}]},{"nodeType":"security","requirements":[{"schemes":[{"name":"BearerAuthenticationV2","scopes":[],"type":"http","scheme":"bearer","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"使用標準的 'Bearer authentication'。請在標頭中放入您的 'API Key'："},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"Authorization:Bearer YOUR_API_KEY"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"。請注意 'Bearer' 與 'YOUR_API_KEY' 之間有一個空格。"},"children":[],"type":"text"}],"type":"paragraph"}]}]}]},{"nodeType":"item-content","variant":"body","label":"Request Body","labelTranslationKey":"body","required":true,"mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"schema_0"}},"schemaId":"schema_0","pointer":"/paths/~1s2s~1v2.0~1file/post/requestBody"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"POST","path":"/s2s/v2.0/file","servers":[{"url":"https://yce-api-01.makeupar.com"}],"parameters":{"path":[],"query":[],"querystring":[],"header":[],"cookie":[]},"security":[{"schemes":[{"id":"BearerAuthenticationV2","type":"http","scheme":"bearer"}],"scopes":[]}],"requestBody":{"application/json":{"schemaId":"schema_0"}},"responseCodes":["200","400","401"],"pointer":"/s2s/v2.0/file","href":"paths/~1s2s~1v2.0~1file/post","summary":"建立新檔案。"},"isWebhook":false,"hideReplay":false,"servers":[{"url":"https://yce-api-01.makeupar.com"}],"schemaId":"schema_0","mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"schema_0"}},"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"200","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"成功取得檔案上傳資訊"},"children":[],"type":"text"}],"type":"paragraph"}],"mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_1"}},"schemaId":"schema_1"},{"code":"400","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"請求參數無效"},"children":[],"type":"text"}],"type":"paragraph"}],"mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_2"}},"schemaId":"schema_2"},{"code":"401","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"API 金鑰無效或缺失"},"children":[],"type":"text"}],"type":"paragraph"}],"mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_3"}},"schemaId":"schema_3"}],"pointer":"/paths/~1s2s~1v2.0~1file/post/responses"}],"panels":[{"children":[{"kind":"response","responseCodes":[{"code":"200","schemaId":"schema_1","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_1"}}},{"code":"400","schemaId":"schema_2","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_2"}}},{"code":"401","schemaId":"schema_3","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_3"}}}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/paths/~1s2s~1v2.0~1file/post"}],"panels":[]}]},"httpPath":"/s2s/v2.0/file"}],"store":{"schemaStore":{"components/schemas/FileV1.1":{"id":"components/schemas/FileV1.1","kind":"json-schema","title":"File V1.1","data":{"title":"File V1.1","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"這個物件代表一個檔案。"},"children":[],"type":"text"}],"type":"paragraph"}],"type":"object","required":["files"],"properties":{"files":{"type":"array","items":{"type":"object","required":["content_type","file_name","file_size"],"properties":{"content_type":{"type":"string","example":"image/jpg","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"指定檔案的內容 MIME 類型。目前支援的值包含圖片與影片格式，例如 image/jpg 與 video/mp4。"},"children":[],"type":"text"}],"type":"paragraph"}]},"file_name":{"type":"string","example":"my-selfie.jpg","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"這個檔案的名稱"},"children":[],"type":"text"}],"type":"paragraph"}]},"file_size":{"type":"integer","example":50000,"description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"檔案大小（位元組）。支援的上限為圖片檔案 10 MB、影片檔案 100 MB。"},"children":[],"type":"text"}],"type":"paragraph"}]}}}}}}},"components/schemas/BasicFileResponse":{"id":"components/schemas/BasicFileResponse","kind":"json-schema","title":"BasicFileResponse","data":{"type":"object","properties":{"files":{"type":"array","items":{"type":"object","properties":{"content_type":{"type":"string","example":"image/jpg","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"這個檔案的內容 MIME 類型。"},"children":[],"type":"text"}],"type":"paragraph"}]},"file_name":{"type":"string","example":"my-selfie.jpg","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"這個檔案的名稱"},"children":[],"type":"text"}],"type":"paragraph"}]},"file_id":{"type":"string","example":"U8aqJbsXGT537jtGnEDFHqxdDXqh8+oTF/cSkLimzuvVwMP+Jb1XbjPsf7ZgUgLY","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"此檔案的 ID。其他執行任務 API 會需要這個 `file_id`。"},"children":[],"type":"text"}],"type":"paragraph"}]},"requests":{"type":"array","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"使用下方的 `url`、`headers`、`method` 上傳檔案。完成後，`file_id` 將用於後續呼叫執行任務 API。"},"children":[],"type":"text"}],"type":"paragraph"}],"items":{"type":"object","properties":{"headers":{"type":"object","example":{"Content-Type":"image/jpg","Content-Length":50000},"description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"上傳檔案時要納入的標頭"},"children":[],"type":"text"}],"type":"paragraph"}]},"url":{"type":"string","example":"https://example.com/presigned-upload-url","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"上傳這個檔案的網址"},"children":[],"type":"text"}],"type":"paragraph"}]},"method":{"type":"string","example":"PUT","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"上傳這個檔案所用的 HTTP 方法"},"children":[],"type":"text"}],"type":"paragraph"}]}}}}}}}}}},"components/schemas/FileResponseV2":{"id":"components/schemas/FileResponseV2","kind":"json-schema","title":"FileResponseV2","data":{"type":"object","properties":{"files":{"type":"array","items":{"type":"object","properties":{"content_type":{"type":"string","example":"image/jpg","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"這個檔案的內容 MIME 類型。"},"children":[],"type":"text"}],"type":"paragraph"}]},"file_name":{"type":"string","example":"my-selfie.jpg","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"這個檔案的名稱"},"children":[],"type":"text"}],"type":"paragraph"}]},"file_id":{"type":"string","example":"U8aqJbsXGT537jtGnEDFHqxdDXqh8+oTF/cSkLimzuvVwMP+Jb1XbjPsf7ZgUgLY","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"此檔案的 ID。其他執行任務 API 會需要這個 `file_id`。"},"children":[],"type":"text"}],"type":"paragraph"}]},"requests":{"type":"array","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"使用下方的 `url`、`headers`、`method` 上傳檔案。完成後，`file_id` 將用於後續呼叫執行任務 API。"},"children":[],"type":"text"}],"type":"paragraph"}],"items":{"type":"object","properties":{"headers":{"type":"object","example":{"Content-Type":"image/jpg","Content-Length":50000},"description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"上傳檔案時要納入的標頭"},"children":[],"type":"text"}],"type":"paragraph"}]},"url":{"type":"string","example":"https://example.com/presigned-upload-url","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"上傳這個檔案的網址"},"children":[],"type":"text"}],"type":"paragraph"}]},"method":{"type":"string","example":"PUT","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"上傳這個檔案所用的 HTTP 方法"},"children":[],"type":"text"}],"type":"paragraph"}]}}}}}}}}}},"schema_0":{"kind":"json-schema","data":{"allOf":[{"$ref":"#/components/schemas/FileV1.1"}]},"id":"schema_0"},"schema_1":{"kind":"json-schema","data":{"allOf":[{"$ref":"#/components/schemas/FileResponseV2"}]},"id":"schema_1"},"schema_2":{"kind":"json-schema","data":{"type":"object","properties":{"status":{"type":"integer","example":400,"description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"回應狀態"},"children":[],"type":"text"}],"type":"paragraph"}]},"error":{"type":"string","example":"Invalid parameter value"},"error_code":{"type":"string","example":"InvalidParameters"}}},"id":"schema_2"},"schema_3":{"kind":"json-schema","data":{"type":"object","properties":{"status":{"type":"integer","example":401,"description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"回應狀態"},"children":[],"type":"text"}],"type":"paragraph"}]},"error":{"type":"string","example":"Invalid API key"}}},"id":"schema_3"}},"exampleStore":{},"securitySchemeStore":{"BearerAuthenticationV2":{"id":"BearerAuthenticationV2","type":"http","scheme":"bearer","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"使用標準的 'Bearer authentication'。請在標頭中放入您的 'API Key'："},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"Authorization:Bearer YOUR_API_KEY"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"。請注意 'Bearer' 與 'YOUR_API_KEY' 之間有一個空格。"},"children":[],"type":"text"}],"type":"paragraph"}]}},"specVersion":"3.0.0","servers":[{"url":"https://yce-api-01.makeupar.com"}],"specType":"openapi"},"options":{"layout":"stacked","mockServer":{"off":true,"position":"off"},"disableRouter":true,"downloadUrls":[{"url":"/_bundle/@l10n/zh-TW/reference/file.json?download"},{"url":"/_bundle/@l10n/zh-TW/reference/file.yaml?download"}],"excludeFromSearch":false,"replayFeatures":{"graphql":false,"asyncapi":false},"specType":"openapi","markdocOptions":{"tags":{},"nodes":{},"components":{}},"metadata":{"title":"檔案管理"}},"baseSlug":"/zh-tw/reference/file","routesMapping":{}}