@wowandy/photo_room_client_api_js
v1.0.5
Published
The power of PhotoRoom, automated.
Downloads
12
Readme
PhotoRoomClientAPIJS
PhotoRoomClientAPIJS - JavaScript client for PhotoRoom API. This SDK is automatically generated by the OpenAPI Generator project:
- API version: 1.0.0
- Package version: 1.0.5
- Build package: org.openapitools.codegen.languages.JavascriptClientCodegen For more information, please visit https://photoroom.com/api
Installation
For Node.js
npm
npm i @wowandy/photo_room_client_api_js
Getting Started
Please follow the installation instruction, then get your API key and execute the following JS code:
import * as PhotoRoom from "@wowandy/photo_room_client_api_js"
const defaultClient = PhotoRoom.ApiClient.instance;
// Configure API key authorization: x-api-key
const xApiKey = defaultClient.authentications['x-api-key'];
xApiKey.apiKey = 'YOUR API KEY'
const api = new PhotoRoom.DefaultApi()
api.accountDetails((error, data, response) => {
console.log('accountDetails', data)
if (error) {
console.error(error)
throw error;
}
});
Documentation for API Endpoints
All URIs are relative to https://beta-sdk.photoroom.com
| Class | Method | HTTP request | Description | |---------------------------|-----------------------------------------------------------------------|----------------------------------|----------------------------| | PhotoRoomApi.DefaultApi | accountDetails | GET /v1/account | Account Details | | PhotoRoomApi.DefaultApi | editImageGet | GET /v1/render | [BETA] Edit Image v1 | | PhotoRoomApi.DefaultApi | editImagePost | POST /v1/render | [BETA] Edit Image v1 | | PhotoRoomApi.DefaultApi | instantBackgroundGet | GET /v1/instant-backgrounds | [BETA] Generate Background | | PhotoRoomApi.DefaultApi | instantBackgroundPost | POST /v1/instant-backgrounds | [BETA] Generate Background | | PhotoRoomApi.DefaultApi | removeBackground | POST /v1/segment | Remove Background | | PhotoRoomApi.DefaultApi | v2EditGet | GET /v2/edit | [BETA] Edit Image v2 | | PhotoRoomApi.DefaultApi | v2EditPost | POST /v2/edit | [BETA] Edit Image v2 |
Documentation for Models
- PhotoRoomApi.AccountDetails200Response
- PhotoRoomApi.AccountDetails200ResponseCredits
- PhotoRoomApi.EditImageBadRequest
- PhotoRoomApi.EditImageBadRequestError
- PhotoRoomApi.FieldMissingError
- PhotoRoomApi.FieldMissingError1
- PhotoRoomApi.FieldMissingError1Error
- PhotoRoomApi.FieldMissingError2
- PhotoRoomApi.FieldMissingError2Error
- PhotoRoomApi.FieldMissingError3
- PhotoRoomApi.FieldMissingError3Error
- PhotoRoomApi.FieldMissingError4
- PhotoRoomApi.FieldMissingError4Error
- PhotoRoomApi.PaymentError
- PhotoRoomApi.PaymentErrorError
- PhotoRoomApi.RemoveBackground200Response
- PhotoRoomApi.UnknownError
- PhotoRoomApi.UnknownErrorError
Documentation for Authorization
Authentication schemes defined for the API:
x-api-key
- Type: API key
- API key parameter name: x-api-key
- Location: HTTP header