Skip to content

sketch-to-image return message (The request multipart form is malformed: One of the files in the multipart form is not expected) #26

@success110

Description

@success110

hi

env:python 3.9

usage:

img:WX20230912-140459

import requests

r = requests.post('https://clipdrop-api.co/sketch-to-image/v1/sketch-to-image',
  files = {
    'image_file': ('owl-sketch.jpg', image_file_object, 'image/jpeg'),
    },
  data = { 'prompt': 'an owl on a branch, cinematic' },
  headers = { 'x-api-key': 'YOUR_API_KEY'}
)
if (r.ok):
  # r.content contains the bytes of the returned image
else:


  r.raise_for_status()

retrun error message :
The request multipart form is malformed: One of the files in the multipart form is not expected

Please help me find out why there is an error. I'm looking forward to your response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions