API code generation
Once a REST request works in Voyager, turn it into code for the language you're actually shipping, instead of retyping headers and a body by hand.
What it does
The code generation panel produces a ready-to-paste snippet from the current request in five targets:
- cURL — a plain shell command.
- JavaScript (fetch) — browser or Node fetch.
- Node.js (axios) — axios request config.
- Python (requests) — the requests library.
- Java (HttpClient) — java.net.http.HttpClient.
Use cases
- Prototyping a request in Voyager, then dropping the equivalent code straight into your app.
- Sharing a request with a teammate as a runnable cURL command instead of a screenshot.
- Writing API documentation that needs a real, working code sample per language.
Frequently asked questions
Which requests can generate code?
REST requests today — code generation is tied to the REST plugin’s request/response model.
Does it include my headers and auth?
Yes, the generated snippet reflects the request’s current method, URL, params, headers, body, and authentication.
Related: Request builder