Search

Search HiAPI models, tools, and resources.

cURL to Python, Node.js & Go Converter

Paste a cURL request, pick a language, and copy working code. The base URL defaults to HiAPI, so moving an OpenAI-compatible call over takes one paste.

Your command is parsed in this browser and is never uploaded.

On by default. Keys in headers, the query string, and the request body are replaced with a placeholder.

import requests

headers = {
    "Content-Type": "application/json",
    "Authorization": "Bearer YOUR_API_KEY",
}

payload = {
    "model": "gpt-4o-mini",
    "messages": [
        {
            "role": "user",
            "content": "Hello!",
        },
    ],
}

response = requests.request(
    "POST",
    "https://api.hiapi.ai/v1/chat/completions",
    headers=headers,
    json=payload,
)

print(response.status_code)
print(response.text)

Run it on HiAPI in three steps

  1. 01Create a free account

    Sign up with email, Google or GitHub. It takes about a minute.

    Sign up
  2. 02Create an API key

    Generate a key in the dashboard and use it in place of YOUR_API_KEY.

    Get an API key
  3. 03Make your first call

    Copy the code above, add your key and run it. Your request shows up in the usage logs.

How to convert cURL to code

  1. 01Paste your cURL

    Copy a request from API docs, a terminal, or browser DevTools (Copy as cURL) and paste it into the box.

  2. 02Choose a language

    Switch between Python (requests), Node.js (fetch) and Go (net/http). Code updates as you type.

  3. 03Copy and run

    Replace YOUR_API_KEY with your HiAPI key, then run the code. Create a key in the HiAPI dashboard.

cURL converter FAQ

Is my cURL command uploaded anywhere?

No. Parsing and code generation run entirely in your browser. Nothing is sent to HiAPI or any other server.

Why does the generated code point at api.hiapi.ai?

The tool swaps the host of your request for the HiAPI base URL and keeps the path and query. Turn the option off to keep the original host, or type any other base URL.

What happens to the API key in my command?

By default, values under Authorization and API-key headers, sensitive query parameters, and sensitive fields in the request body are replaced with YOUR_API_KEY. You can turn that off, but then the key appears in the generated code.

Which cURL options are supported?

Method (-X), headers (-H), data (-d, --data-raw), basic auth (-u), cookies (-b), --url and -G. Multipart (-F) and file uploads are rejected with a clear message instead of producing code that would not run.

Will my OpenAI-compatible request work on HiAPI?

Chat Completions style requests work when the model name is available on HiAPI. Check the models page for the exact model IDs and endpoints.