Skip to content

Commit

Permalink
Merge pull request #968 from jboolean/palette-api-upgrade
Browse files Browse the repository at this point in the history
Switch palette api to new host
  • Loading branch information
jboolean authored Jan 20, 2024
2 parents 5cdbd52 + 8be0c97 commit 22265c0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion backend/serverless.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ provider:
MODERATORS_TO_EMAIL: ${ssm:/${self:service}-${sls:stage}-moderators-to-email}
MAPBOX_SK: ${ssm:/${self:service}-${sls:stage}-mapbox-sk}
OPENAI_SK: ${ssm:/${self:service}-${sls:stage}-openai-sk}
PALETTE_API_KEY: ${ssm:/${self:service}-${sls:stage}-palette-api-key}
RAPIDAPI_API_KEY: ${ssm:/${self:service}-${sls:stage}-rapidapi-api-key}
plugins:
- serverless-plugin-select
- serverless-plugin-typescript
Expand Down
8 changes: 6 additions & 2 deletions backend/src/business/utils/paletteApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,13 @@ type ColorizeImageWithAutoPromptBase64Request = {
};

const paletteApi = axios.create({
baseURL: 'https://apis.palette.fm/1a0ffbmqnpuf3uzj',
baseURL: 'https://colorize-photo1.p.rapidapi.com/',
headers: {
'X-BLOBR-KEY': required(process.env.PALETTE_API_KEY, 'PALETTE_API_KEY'),
'X-RapidAPI-Key': required(
process.env.RAPIDAPI_API_KEY,
'RAPIDAPI_API_KEY'
),
'X-RapidAPI-Host': 'colorize-photo1.p.rapidapi.com',
'Content-Type': 'multipart/form-data',
},
});
Expand Down

0 comments on commit 22265c0

Please sign in to comment.