400 "Unsupported type" when calling Kimi/Moonshot AI API via Pabbly Connect — JSON body rejected despite correct format

Status: Open · Asked by Redzwan Mutalib on · 0 views

Redzwan Mutalib — Question ·
Hi Pabbly community,
I'm trying to integrate Kimi AI (Moonshot AI) via the API (Pabbly) app in Pabbly Connect, but I keep hitting a 400 Unsupported type error. I've exhausted every configuration I can think of and would really appreciate any guidance.

What I'm trying to do

Send a POST request to the Kimi chat completions endpoint:
plain
https://api.moonshot.ai/v1/chat/completions

My current configuration (API app)

Table
SettingValue
AppAPI (Pabbly)
App EventExecute API Request
MethodPOST
API Endpoint URLhttps://api.moonshot.ai/v1/chat/completions
Payload TypeJSON
Wrap Request in ArrayNo
AuthenticationNo Auth
Header 1Content-Type = application/json
Header 2Authorization = Bearer sk-xxxxxxxx
Enable Select TransformON
Transform Typemy_payload

My JSON Template

JSON
{
  "model": "kimi-k3",
  "messages": [
    {
      "role": "system",
      "content": "Anda ialah reviewer BM dan business-logic untuk projek GK Pro. Jawab ringkas, tepat dan audit-first."
    },
    {
      "role": "user",
      "content": "Jawab satu ayat sahaja: Kimi berjaya disambungkan melalui Pabbly."
    }
  ],
  "max_tokens": 300
}

The Error

plain
statusCode: 400
body error: Unsupported type.

What I've already tried

  1. Different models: kimi-k2.6kimi-k3 (same error)
  2. Removed max_tokens entirely — still 400 Unsupported type
  3. Removed the thinking parameter — still 400 Unsupported type
  4. Tried Set Parameters instead of Select Transform — got invalid_request_error because Pabbly sends all values as strings (e.g., "300" instead of 300)
  5. Tried the Webhooks app — also failed (same or similar error)
  6. Toggled "Wrap Request in Array" ON/OFF — no change
  7. Verified API key is active — account has $22.45 balance, key is valid and unrestricted
  8. Same API key works perfectly via curl and Python script directly

What works (outside Pabbly)

This exact curl command returns a 200 OK with the correct response:
bash
curl https://api.moonshot.ai/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $MOONSHOT_API_KEY" \
  -d '{
    "model": "kimi-k3",
    "messages": [
      {"role": "system", "content": "You are a helpful assistant."},
      {"role": "user", "content": "Say hello."}
    ],
    "max_tokens": 100
  }'
So the API key, endpoint, and JSON body are 100% correct. The issue is how Pabbly is sending the request body.

My hypothesis

It seems like Pabbly's Select Transform (or the way the API app constructs the JSON body) is altering the payload before sending it to Kimi's server. The 400 Unsupported type suggests Kimi is receiving something other than a valid JSON object — possibly a stringified JSON, an array wrapper, or a malformed content-type header in the body itself.

What I need help with

  1. Is there a correct way to send raw JSON in the API app without Select Transform mangling the payload?
  2. Should I be using a different app (Webhooks, HTTP, etc.) for this use case?
  3. Is there a known issue with Pabbly sending integer values vs strings in JSON bodies?
  4. Any working example of integrating OpenAI-compatible APIs (like Moonshot/Kimi) in Pabbly Connect?
Any help would be greatly appreciated. Happy to share more screenshots or logs if needed.
Thanks in advance!
Redzwan Mutalib — Reply ·

Hi Pabbly community,

I'm trying to integrate Kimi AI (Moonshot AI) via the API (Pabbly) app in Pabbly Connect, but I keep hitting a 400 Unsupported type error. I've exhausted every configuration I can think of and would really appreciate any guidance.

What I'm trying to do

Send a POST request to the Kimi chat completions endpoint:

plain

https://api.moonshot.ai/v1/chat/completions

My current configuration (API app)

Table

Setting Value

App API (Pabbly)

App Event Execute API Request

Method POST

API Endpoint URL https://api.moonshot.ai/v1/chat/completions

Payload Type JSON

Wrap Request in Array No

Authentication No Auth

Header 1 Content-Type = application/json

Header 2 Authorization = Bearer sk-xxxxxxxx

Enable Select Transform ON

Transform Type my_payload

My JSON Template

JSON

{

"model": "kimi-k3",

"messages": [

{

"role": "system",

"content": "Anda ialah reviewer BM dan business-logic untuk projek GK Pro. Jawab ringkas, tepat dan audit-first."

},

{

"role": "user",

"content": "Jawab satu ayat sahaja: Kimi berjaya disambungkan melalui Pabbly."

}

],

"max_tokens": 300

}

The Error

plain

statusCode: 400

body error: Unsupported type.

What I've already tried

✅ Different models: kimi-k2.6 → kimi-k3 (same error)

✅ Removed max_tokens entirely — still 400 Unsupported type

✅ Removed the thinking parameter — still 400 Unsupported type

✅ Tried Set Parameters instead of Select Transform — got invalid_request_error because Pabbly sends all values as strings (e.g., "300" instead of 300)

✅ Tried the Webhooks app — also failed (same or similar error)

✅ Toggled "Wrap Request in Array" ON/OFF — no change

✅ Verified API key is active — account has $22.45 balance, key is valid and unrestricted

✅ Same API key works perfectly via curl and Python script directly

What works (outside Pabbly)

This exact curl command returns a 200 OK with the correct response:

bash

curl https://api.moonshot.ai/v1/chat/completions \

-H "Content-Type: application/json" \

-H "Authorization: Bearer $MOONSHOT_API_KEY" \

-d '{

"model": "kimi-k3",

"messages": [

{"role": "system", "content": "You are a helpful assistant."},

{"role": "user", "content": "Say hello."}

],

"max_tokens": 100

}'

So the API key, endpoint, and JSON body are 100% correct. The issue is how Pabbly is sending the request body.

My hypothesis

It seems like Pabbly's Select Transform (or the way the API app constructs the JSON body) is altering the payload before sending it to Kimi's server. The 400 Unsupported type suggests Kimi is receiving something other than a valid JSON object — possibly a stringified JSON, an array wrapper, or a malformed content-type header in the body itself.

What I need help with

Is there a correct way to send raw JSON in the API app without Select Transform mangling the payload?

Should I be using a different app (Webhooks, HTTP, etc.) for this use case?

Is there a known issue with Pabbly sending integer values vs strings in JSON bodies?

Any working example of integrating OpenAI-compatible APIs (like Moonshot/Kimi) in Pabbly Connect?

Any help would be greatly appreciated. Happy to share more screenshots or logs if needed.

Thanks in advance!

System — Reply ·

🔐 Private credentials requested

A secure link has been sent to your registered email. Open the secure form — visible only to you when signed in to the forum.

Pabbly Support — Reply ·

Hi Redzwan,

Thank you for the detailed explanation.

To investigate this further, we've sent you a secure link where you can safely share the exact working cURL command that you're using in Postman.

Please use that secure link to provide:

The complete working cURL command exported from Postman (or the one that returns a 200 OK response).

Once we receive it, we'll import the cURL into the API by Pabbly step and compare the generated request with your working request to identify what's causing the 400 Unsupported type error.

We'll update you as soon as we've completed our investigation.

Thanks & Regards,
Hrishabh
Customer Support Associate
🌐 Pabbly.com
👉 Rate your support

Back to all forum threads · Log in to reply