---
title: "Native streaming hop for local execute: the request body is the outbound fetch body (raw bytes, no JSON wrapper)."
method: POST
path: "/v1/capability-proxy/gateway-fetch"
tags: ["capability-proxy"]
---

# Native streaming hop for local execute: the request body is the outbound fetch body (raw bytes, no JSON wrapper).

`POST /v1/capability-proxy/gateway-fetch`

## Request

- Base URL: `https://api.kody.codes`
- URL: `https://api.kody.codes/v1/capability-proxy/gateway-fetch`
- Auth: HTTP bearer

Native streaming hop for local execute: the request body is the outbound fetch body (raw bytes, no JSON wrapper). Hop metadata is in `X-Kody-Gateway-Url` (required), `X-Kody-Gateway-Method`, `X-Kody-Gateway-Package-Id`, `X-Kody-Gateway-Headers`, and `x-kody-secret-resolution`. A successful response is the upstream HTTP response, streamed — not `{ status, headers, bodyBase64 }`. Requires `org:execute` and a scoped API token or CLI MCP OAuth bearer. Not available as a JSON MCP `api` invoke; use `POST /v1/capability-proxy/gateway-fetch`.

Org permission: `org:execute`.

## Headers

- `X-Kody-Gateway-Url` string, required
- `X-Kody-Gateway-Method` string
- `X-Kody-Gateway-Package-Id` string
- `X-Kody-Gateway-Headers` string
- `x-kody-secret-resolution` string

## Response `200`

Upstream HTTP response: status, headers, and body, streamed. Not a JSON envelope. Upstream 4xx/5xx (including 429) are forwarded as the stream, not the JSON Error envelope.

## Other responses

- `default`: Origin-side failure before the upstream stream starts (auth, validation, etc.). Upstream 4xx/5xx are not this response — they are forwarded on the 200 stream with the upstream status, headers, and body.

---

[API](https://skmtc.dev/kody/apis/kody-api.md) · [All operations](https://skmtc.dev/kody/apis/kody-api/llms.txt) · [OpenAPI document](https://skmtc.dev/kody/apis/kody-api/revisions/a020ecedb82b?raw)
