Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -277,13 +277,13 @@ This is especially useful for integrations that require direct file responses ra

There is a deployed instance of this API available at:
```
https://quote.yuri.ly/quote/generate
https://quote.yuri.ly/generate
```

You can also use format-specific endpoints:
```
https://quote.yuri.ly/quote/generate.png
https://quote.yuri.ly/quote/generate.webp
https://quote.yuri.ly/generate.png
https://quote.yuri.ly/generate.webp
```

You can use these URLs for testing purposes, but please note that stability isn't guaranteed for production use.
Expand Down Expand Up @@ -312,7 +312,7 @@ const simpleExample = async () => {
}]
}

const response = await axios.post('https://quote.yuri.ly/quote/generate', payload)
const response = await axios.post('https://quote.yuri.ly/generate', payload)
if (response.data.error) {
console.error('Error:', response.data.error)
return
Expand Down Expand Up @@ -362,14 +362,14 @@ const completeExample = async () => {
}

// Option 1: Using the regular endpoint (returns base64)
const response = await axios.post('https://quote.yuri.ly/quote/generate', payload)
const response = await axios.post('https://quote.yuri.ly/generate', payload)
const buffer = Buffer.from(response.data.image, 'base64')
fs.writeFileSync('quote.png', buffer)
console.log("Saved quote.png")

// Option 2: Using the PNG endpoint directly (returns binary)
const binaryResponse = await axios.post(
'https://quote.yuri.ly/quote/generate.png',
'https://quote.yuri.ly/generate.png',
payload,
{ responseType: 'arraybuffer' }
)
Expand Down Expand Up @@ -406,7 +406,7 @@ def simple_example():
}

try:
r = requests.post('https://quote.yuri.ly/quote/generate', json=payload)
r = requests.post('https://quote.yuri.ly/generate', json=payload)
data = r.json()
if 'error' in data:
print(f"Error: {data['error']}")
Expand Down Expand Up @@ -455,15 +455,15 @@ def complete_example():

try:
# Option 1: Using the regular endpoint (returns base64)
r = requests.post('https://quote.yuri.ly/quote/generate', json=payload)
r = requests.post('https://quote.yuri.ly/generate', json=payload)
data = r.json()
img = base64.b64decode(data['image'])
with open('quote.png', 'wb') as f:
f.write(img)
print("Saved quote.png")

# Option 2: Using the PNG endpoint directly (returns binary)
r = requests.post('https://quote.yuri.ly/quote/generate.png', json=payload)
r = requests.post('https://quote.yuri.ly/generate.png', json=payload)
with open('quote-direct.png', 'wb') as f:
f.write(r.content)
print("Saved quote-direct.png")
Expand Down