openapi: 3.0.0 info: title: Leonardo.AI 3D Model Assets API description: Upload, retrieve, and delete 3D model assets for use with Rodin and other 3D-capable workflows. version: v1.0.0 contact: name: Leonardo.AI Support url: https://docs.leonardo.ai/docs/need-more-support license: name: Leonardo.AI Terms of Service url: https://leonardo.ai/terms-of-service/ servers: - url: https://cloud.leonardo.ai/api/rest/v1 description: Leonardo.AI Production API security: - bearerAuth: [] tags: - name: 3D Model Assets paths: /models-3d/upload: post: tags: - 3D Model Assets summary: Upload 3D Model description: This endpoint returns presigned details to upload a 3D model to S3 operationId: uploadModelAsset parameters: [] requestBody: content: application/json: schema: properties: modelExtension: nullable: false title: String type: string name: nullable: true title: String type: string type: object description: Query parameters can also be provided in the request body as a JSON object required: false responses: '200': content: application/json: schema: properties: uploadModelAsset: nullable: true properties: modelFields: nullable: true title: String type: string modelId: nullable: true title: String type: string modelKey: nullable: true title: String type: string modelUrl: nullable: true title: String type: string title: ModelAssetUploadOutput type: object description: Responses for POST /api/rest/v1/models-3d/upload /models-3d/user/{userId}: get: tags: - 3D Model Assets summary: Get 3D models by user ID description: This endpoint returns all 3D models by a specific user operationId: get3DModelsByUserId parameters: - in: query name: offset schema: default: 0 type: integer - in: query name: limit schema: default: 10 type: integer - required: true in: path name: userId schema: pattern: '[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89aAbB][a-f0-9]{3}-[a-f0-9]{12}' type: string requestBody: content: application/json: schema: properties: userId: $ref: '#/components/schemas/uuid' type: object description: Query parameters can also be provided in the request body as a JSON object required: false responses: '200': content: application/json: schema: properties: model_assets: items: description: columns and relationships of "model_assets" nullable: false properties: createdAt: $ref: '#/components/schemas/timestamp' id: $ref: '#/components/schemas/uuid' meshUrl: nullable: false title: String type: string name: nullable: true title: String type: string updatedAt: $ref: '#/components/schemas/timestamp' userId: $ref: '#/components/schemas/uuid' title: model_assets type: object nullable: false type: array description: Responses for GET /api/rest/v1/models-3d/user/{userId} /models-3d/{id}: get: tags: - 3D Model Assets summary: Get 3D Model by ID description: This endpoint gets the specific 3D model operationId: get3DModelById parameters: - in: query name: offset schema: default: 0 type: integer - in: query name: limit schema: default: 10 type: integer - required: true description: _"id" is required (enter it either in parameters or request body)_ in: path name: id schema: pattern: '[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89aAbB][a-f0-9]{3}-[a-f0-9]{12}' type: string requestBody: content: application/json: schema: properties: id: $ref: '#/components/schemas/uuid' type: object description: Query parameters can also be provided in the request body as a JSON object required: false responses: '200': content: application/json: schema: properties: model_assets_by_pk: description: columns and relationships of "model_assets" nullable: true properties: createdAt: $ref: '#/components/schemas/timestamp' id: $ref: '#/components/schemas/uuid' meshUrl: nullable: false title: String type: string name: nullable: true title: String type: string updatedAt: $ref: '#/components/schemas/timestamp' userId: $ref: '#/components/schemas/uuid' title: model_assets type: object description: Responses for GET /api/rest/v1/models-3d/{id} delete: tags: - 3D Model Assets summary: Delete 3D Model by ID description: This endpoint deletes the specific 3D Model operationId: delete3DModelById parameters: - required: true description: _"id" is required (enter it either in parameters or request body)_ in: path name: id schema: pattern: '[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89aAbB][a-f0-9]{3}-[a-f0-9]{12}' type: string requestBody: content: application/json: schema: properties: id: $ref: '#/components/schemas/uuid' type: object description: Query parameters can also be provided in the request body as a JSON object required: false responses: '200': content: application/json: schema: properties: delete_model_assets_by_pk: description: columns and relationships of "model_assets" nullable: true properties: id: $ref: '#/components/schemas/uuid' title: model_assets type: object description: Responses for DELETE /api/rest/v1/models-3d/{id} components: schemas: uuid: nullable: true pattern: '[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89aAbB][a-f0-9]{3}-[a-f0-9]{12}' title: uuid type: string timestamp: type: string nullable: false title: timestamp securitySchemes: bearerAuth: type: http bearerFormat: auth-scheme description: 'Bearer HTTP authentication. Allowed headers `Authorization: Bearer `' scheme: bearer