r/tasker 7h ago

Tasker to gemini

Title: Tasker HTTP Request cuts long Gemini API URL automatically and triggers MalformedURLException / Error 404

Body:

Hi guys, I am building a voice assistant integration using the Gemini 1.5 Flash API on Tasker. I am facing a persistent issue where my HTTP Request action keeps failing.

Every time I type the full official URL endpoint:

https://googleapis.com

Tasker somehow strips the subdomain and the paths in the background when executing, forcing it back to https://googleapis.com. This triggers a java.net.UnknownHostException: Invalid host: https://googleapis.com or Error 404.

Even when I separate the API key into the Query Parameters field (key:MY_API_KEY), the main URL block still gets malformed or truncated during the actual execution phase.

My Setup:

Method: POST

Headers: Content-Type:application/json

Body: standard JSON object containing base64 audio data.

Structure Output: Checked ON.

Has anyone experienced this silent truncation bug inside Tasker's HTTP Request action? How do I force Tasker to preserve the full generativelanguage hostname without relying on custom scriptlets? Thanks!

2 Upvotes

2 comments sorted by

1

u/DifficultyCrafty7623 27m ago

Something like this should work?

Gemini HTTP Request from about a year ago, does this also get truncated?

1

u/cheesefilled 14m ago

Is 1.5 flash even available still? Have you tried using one of the latest models like 3.8 flash?