MARII ASK API
how to call it from your code  |  one GET, many languages  |  oct 2026

This is a GET JSON API. Put the question in the URL. No key. No POST. No cloud LLM. Copy a snippet into your program.

The URL
https://marii-ask.mainline-mi.workers.dev/ + url-encoded question. Space = %20. Percent = %25.

https://marii-ask.mainline-mi.workers.dev/how%20is%20judge
https://marii-ask.mainline-mi.workers.dev/what%20is%20popcorn
https://marii-ask.mainline-mi.workers.dev/15%25%20of%2080
https://pyx-ai.web.app/api/marii/ask/how%20is%20judge

What you get back   read reply

{
  "ok": true,
  "request": "how is judge",
  "reply": "Aaron Judge (#99) ...",
  "echo": "how is judge",
  "source": "sports",
  "backend": "pyx-assistant",
  "ai": false
}

Jump
curl · bash · zsh · wget · HTTP · PHP · Python · JavaScript · TypeScript · Node · Deno · Ruby · Perl · Go · Rust · Java · Kotlin · C# · F# · VB.NET · C · C++ · Obj-C · Swift · Dart · R · Lua · PowerShell · Batch · AppleScript · Scala · Groovy · Clojure · Elixir · Erlang · Haskell · OCaml · Julia · MATLAB · Racket · Crystal · Nim · Zig · D · Pascal · Fortran · COBOL · Ada · Tcl · Awk · VBA · AutoHotkey · HTML · CFML · Prolog · Common Lisp


curl / sh

curl -sS "https://marii-ask.mainline-mi.workers.dev/how%20is%20judge"

bash

q="how is judge"
curl -sS "https://marii-ask.mainline-mi.workers.dev/${q// /%20}"

Paste those two lines into the prompt. Do not paste a #! shebang into zsh — ! is history and you get "event not found".

zsh

q="how is judge"
curl -sS "https://marii-ask.mainline-mi.workers.dev/${q// /%20}"

Same two lines. Optional zsh spelling: ${q:gs/ /%20}. A shebang belongs in a saved script file only — never paste it into a live zsh prompt.

wget

wget -qO- "https://marii-ask.mainline-mi.workers.dev/how%20is%20judge"

raw HTTP

GET /how%20is%20judge HTTP/1.1
Host: marii-ask.mainline-mi.workers.dev
Accept: application/json

PHP

<?php
$q = "how is judge";
$url = "https://marii-ask.mainline-mi.workers.dev/" . rawurlencode($q);
$json = file_get_contents($url);
$data = json_decode($json, true);
echo $data["reply"];
?>

If allow_url_fopen is off:

<?php
$url = "https://marii-ask.mainline-mi.workers.dev/" . rawurlencode("how is judge");
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
echo $data["reply"];
?>

Python

from urllib.parse import quote
from urllib.request import urlopen
import json
url = "https://marii-ask.mainline-mi.workers.dev/" + quote("how is judge")
data = json.load(urlopen(url))
print(data["reply"])
import requests
r = requests.get("https://marii-ask.mainline-mi.workers.dev/how%20is%20judge")
print(r.json()["reply"])

JavaScript (browser)

fetch("https://marii-ask.mainline-mi.workers.dev/" + encodeURIComponent("how is judge"))
  .then(function (r) { return r.json(); })
  .then(function (data) { console.log(data.reply); });

TypeScript

const url = "https://marii-ask.mainline-mi.workers.dev/" + encodeURIComponent("how is judge");
const data = await (await fetch(url)).json();
console.log(data.reply as string);

Node.js

const url = "https://marii-ask.mainline-mi.workers.dev/" + encodeURIComponent("how is judge");
const data = await (await fetch(url)).json();
console.log(data.reply);

Deno / Bun

const data = await (await fetch(
  "https://marii-ask.mainline-mi.workers.dev/" + encodeURIComponent("how is judge")
)).json();
console.log(data.reply);

Ruby

require "open-uri"
require "json"
require "uri"
url = "https://marii-ask.mainline-mi.workers.dev/" + URI.encode_www_form_component("how is judge")
puts JSON.parse(URI.open(url).read)["reply"]

Perl

use LWP::Simple;
use JSON;
my $url = "https://marii-ask.mainline-mi.workers.dev/how%20is%20judge";
print decode_json(get($url))->{reply}, "\n";

Go

package main
import (
  "encoding/json"
  "fmt"
  "net/http"
  "net/url"
)
func main() {
  u := "https://marii-ask.mainline-mi.workers.dev/" + url.PathEscape("how is judge")
  res, _ := http.Get(u)
  defer res.Body.Close()
  var data map[string]any
  json.NewDecoder(res.Body).Decode(&data)
  fmt.Println(data["reply"])
}

Rust (reqwest + serde_json)

let url = format!(
  "https://marii-ask.mainline-mi.workers.dev/{}",
  urlencoding::encode("how is judge")
);
let v: serde_json::Value = reqwest::blocking::get(url)?.json()?;
println!("{}", v["reply"]);

Java

import java.net.*;
import java.net.http.*;
String q = URLEncoder.encode("how is judge", "UTF-8");
String url = "https://marii-ask.mainline-mi.workers.dev/" + q;
String body = HttpClient.newHttpClient()
  .send(HttpRequest.newBuilder(URI.create(url)).GET().build(),
        HttpResponse.BodyHandlers.ofString()).body();
System.out.println(body);

Kotlin

val q = java.net.URLEncoder.encode("how is judge", "UTF-8")
val text = java.net.URL("https://marii-ask.mainline-mi.workers.dev/$q").readText()
println(text)

C#

using var http = new HttpClient();
var q = Uri.EscapeDataString("how is judge");
var json = await http.GetStringAsync("https://marii-ask.mainline-mi.workers.dev/" + q);
Console.WriteLine(json);

F#

open System.Net.Http
let http = new HttpClient()
let q = System.Uri.EscapeDataString("how is judge")
let json = http.GetStringAsync("https://marii-ask.mainline-mi.workers.dev/" + q).Result
printfn "%s" json

VB.NET

Dim http As New System.Net.Http.HttpClient()
Dim q = Uri.EscapeDataString("how is judge")
Dim json = http.GetStringAsync("https://marii-ask.mainline-mi.workers.dev/" & q).Result
Console.WriteLine(json)

C (libcurl)

#include <curl/curl.h>
CURL *c = curl_easy_init();
curl_easy_setopt(c, CURLOPT_URL,
  "https://marii-ask.mainline-mi.workers.dev/how%20is%20judge");
curl_easy_setopt(c, CURLOPT_FOLLOWLOCATION, 1L);
curl_easy_perform(c);
curl_easy_cleanup(c);

C++

// same as C with libcurl, or:
// #include <cpr/cpr.h>
auto r = cpr::Get(cpr::Url{
  "https://marii-ask.mainline-mi.workers.dev/how%20is%20judge"});
std::cout << r.text;

Objective-C

NSURL *u = [NSURL URLWithString:
  @"https://marii-ask.mainline-mi.workers.dev/how%20is%20judge"];
NSData *d = [NSData dataWithContentsOfURL:u];
NSLog(@"%@", [[NSString alloc] initWithData:d encoding:NSUTF8StringEncoding]);

Swift

let q = "how is judge".addingPercentEncoding(withAllowedCharacters: .urlPathAllowed)!
let url = URL(string: "https://marii-ask.mainline-mi.workers.dev/\(q)")!
let (data, _) = try await URLSession.shared.data(from: url)
print(String(data: data, encoding: .utf8)!)

Dart

import 'dart:convert';
import 'package:http/http.dart' as http;
final q = Uri.encodeComponent("how is judge");
final r = await http.get(Uri.parse("https://marii-ask.mainline-mi.workers.dev/$q"));
print(jsonDecode(r.body)["reply"]);

R

j <- jsonlite::fromJSON("https://marii-ask.mainline-mi.workers.dev/how%20is%20judge")
cat(j$reply, "\n")

Lua (luacurl or http.request)

local http = require("socket.http")
local body = http.request("https://marii-ask.mainline-mi.workers.dev/how%20is%20judge")
print(body)

PowerShell

$r = Invoke-RestMethod "https://marii-ask.mainline-mi.workers.dev/how%20is%20judge"
$r.reply

Windows Batch

curl -sS "https://marii-ask.mainline-mi.workers.dev/how%20is%20judge"

AppleScript

do shell script "curl -sS 'https://marii-ask.mainline-mi.workers.dev/how%20is%20judge'"

Scala

val src = scala.io.Source.fromURL(
  "https://marii-ask.mainline-mi.workers.dev/how%20is%20judge")
println(src.mkString)
src.close()

Groovy

println "https://marii-ask.mainline-mi.workers.dev/how%20is%20judge".toURL().text

Clojure

(println (slurp "https://marii-ask.mainline-mi.workers.dev/how%20is%20judge"))

Elixir

{:ok, {_, _, body}} = :httpc.request(
  'https://marii-ask.mainline-mi.workers.dev/how%20is%20judge')
IO.puts(body)

Erlang

inets:start(),
ssl:start(),
{ok, {_, _, Body}} = httpc:request(get,
  {"https://marii-ask.mainline-mi.workers.dev/how%20is%20judge", []}, [], []),
io:format("~s~n", [Body]).

Haskell

import Network.HTTP.Simple
r <- httpBS "https://marii-ask.mainline-mi.workers.dev/how%20is%20judge"
print (getResponseBody r)

OCaml

(* cohttp-lwt-unix *)
let%lwt _, body = Cohttp_lwt_unix.Client.get
  (Uri.of_string "https://marii-ask.mainline-mi.workers.dev/how%20is%20judge") in
Cohttp_lwt.Body.to_string body |> Lwt_io.print

Julia

using HTTP, JSON
j = JSON.parse(String(HTTP.get("https://marii-ask.mainline-mi.workers.dev/how%20is%20judge").body))
println(j["reply"])

MATLAB / Octave

txt = webread("https://marii-ask.mainline-mi.workers.dev/how%20is%20judge");
disp(txt.reply)

Racket

#lang racket
(require net/url)
(port->string (get-pure-port
  (string->url "https://marii-ask.mainline-mi.workers.dev/how%20is%20judge")))

Crystal

require "http/client"
puts HTTP::Client.get("https://marii-ask.mainline-mi.workers.dev/how%20is%20judge").body

Nim

import httpclient
echo newHttpClient().getContent("https://marii-ask.mainline-mi.workers.dev/how%20is%20judge")

Zig (or just shell out)

// easiest: spawn curl
// std.process.Child.run(.{ .argv = &.{ "curl", "-sS",
//   "https://marii-ask.mainline-mi.workers.dev/how%20is%20judge" } })

D

import std.net.curl;
writeln(get("https://marii-ask.mainline-mi.workers.dev/how%20is%20judge"));

Pascal / Delphi

// Indy
IdHTTP1.Get('https://marii-ask.mainline-mi.workers.dev/how%20is%20judge');

Fortran

! call curl from the shell
call execute_command_line(
  "curl -sS https://marii-ask.mainline-mi.workers.dev/how%20is%20judge")

COBOL

       IDENTIFICATION DIVISION.
       PROGRAM-ID. MARII.
       PROCEDURE DIVISION.
           CALL "SYSTEM" USING
             "curl -sS https://marii-ask.mainline-mi.workers.dev/how%20is%20judge".
           STOP RUN.

Ada

-- spawn curl, or use AWS.Client
-- AWS.Client.Get("https://marii-ask.mainline-mi.workers.dev/how%20is%20judge")

Tcl

package require http
package require tls
::http::register https 443 ::tls::socket
set tok [::http::geturl https://marii-ask.mainline-mi.workers.dev/how%20is%20judge]
puts [::http::data $tok]

Awk

# gawk + curl
@load "readfile"
# or:
# curl -sS URL | awk '{ print }'

VBA (Excel / Access)

Dim http As Object
Set http = CreateObject("MSXML2.XMLHTTP")
http.Open "GET", "https://marii-ask.mainline-mi.workers.dev/how%20is%20judge", False
http.Send
MsgBox http.responseText

AutoHotkey

whr := ComObject("WinHttp.WinHttpRequest.5.1")
whr.Open("GET", "https://marii-ask.mainline-mi.workers.dev/how%20is%20judge", true)
whr.Send()
whr.WaitForResponse()
MsgBox whr.ResponseText

HTML form

<form action="https://marii-ask.mainline-mi.workers.dev/api/marii/ask" method="get">
  <input name="q" value="how is judge">
  <input type="submit" value="Ask">
</form>

CFML / ColdFusion

<cfhttp url="https://marii-ask.mainline-mi.workers.dev/how%20is%20judge" method="get" />
<cfoutput>#cfhttp.filecontent#</cfoutput>

Prolog

:- use_module(library(http/http_open)).
main :-
  http_open("https://marii-ask.mainline-mi.workers.dev/how%20is%20judge", In, []),
  copy_stream_data(In, user_output),
  close(In).

Common Lisp

;; dexador
(print (dex:get "https://marii-ask.mainline-mi.workers.dev/how%20is%20judge"))

GET only. POST is 501 on purpose (no cloud AI).
Encode the question. Read the reply field from the JSON.
These are copy-paste starters for your code, not a local VM lab.
back to mainline intelligence  |  api health

mainline intelligence -- marii ask -- pick a language, paste, go