πŸ”Ό
Upload
Learn how to upload assets with a query.
post
https://api.echo3D.co
/upload
Upload content entry

Target Type

Target types can be one of the following:

0 for IMAGE_TAGET

If you choose to use an image as your AR target, you must also add to your request one of the following:
    url_image: A URL to the image you want to use as a target
    file_image: The image file you want to use as a target. The file will be uploaded as Part.

1 for GEOLOCATION_TARGET

A location target must be associated with a location. You must either send an address or send a location coordinates (longitude and latitude):
    text_geolocation: Address for the location.
    longitude and latitude: Longitude and latitude coordinates

2 for BRICK_TARGET

A surface target needs no additional arguments.

Hologram Type

Hologram types can be one of the following:

0 for VIDEO_HOLOGRAM

Using the video hologram option, you can upload a video file as your 3D asset. Your request must include one of the following:
    url_video: A URL to the video image you want to use as your AR object
    file_video: The video file you want to use as your AR object. The file will be uploaded as Part

1 for IMAGE_HOLOGRAM

Using the image hologram option, you can upload an image file as your 3D asset. Your request must include:
    file_image_hologram: The image file you want to use as your hologram. The file will be uploaded as Part.

2 for MODEL_HOLOGRAM

Using the model hologram you can upload 3D models to your project. Your request must also include:
    type, which must be one of the following values:
      upload: New model file upload. Expects a file part from local storage. If the upload option is chosen, the following must be set as well:
        file_model: The file or files you want to use as your hologram. The file or files will be uploaded as Part. In this case, make sure to set the Content-Type request header tomultipart/form-data.
      search: Getting a 3D model from third-party 3D search engines. If the search option is chosen, the following must be set as well:
        source, either:
          Poly: Finds a model in Google Poly. If the search option is chosen, the following must be set as well:
            bin_url, the Poly URL to the .bin file of the model
            gltf_url, the Poly URL to the .gltf file of the model
            thumbnail, the Poly URL to the thumbnail of the model
            png_url, the Poly URL to the .png resource of the model
            png_path, the Poly relative path to the .png resource of the model
          Sketchfab: Finds a model in Sketchfab. If the search option is chosen, the following must be set as well:
            url, the Sketchfab API URL redirecting to the model. Should be in the form of https://api.sketchfab.com/v3/models/<ID>/download
        name, the model name.

Examples

Here are a few upload API examples using Postman.
1. Uploading a model hologram on a brick target from local storage :
    type is upload and file_model includes a file
    hologram_type is 2
    target_type is 2
2. Uploading a model hologram on a brick target from a third-party search engine:
    type is search, source is Sketchfab, and url includes an URL redirecting to the model
    hologram_type is 2
    target_type is 2
Last modified 19d ago