Join the game
No active order.
Go to to claim one.
Available Orders
Laser Upgrades
Spend your earnings to boost your laser speed. Faster cuts = more orders completed.
My cutting history
Submit cutting plan
Place each piece on the support
▲ Cutting in progress
The laser is running. No commands accepted until it completes.
Result
Generate an HTTP Client
The full API is described by an OpenAPI 3.1 spec. Paste the URL below into your generator of choice to get a type-safe client in your language.
Uses openapi-typescript for type generation and openapi-fetch for a fully type-safe client (no codegen runtime, just types).
Install & generate
npx openapi-typescript __SERVER__/openapi.yaml -o api.d.ts
npm install openapi-fetch
Usage
import createClient from 'openapi-fetch';
import type { paths } from './api';
// Anonymous — register first
const anon = createClient<paths>({ baseUrl: '__SERVER__' });
const { data } = await anon.POST('/franchisees', {
body: { id: 'team-alpha', name: 'Alpha Cutters' },
});
// Authenticated client
const api = createClient<paths>({
baseUrl: '__SERVER__',
headers: { Authorization: 'Bearer ' + data.token },
});
const { data: orders } = await api.GET('/orders');
await api.POST('/orders/{id}/claim', { params: { path: { id: orders[0].id } }, body: {} });
Use requests or httpx directly — lightweight and enough for a kata.
Install
pip install requests
Usage
import requests
BASE = "__SERVER__"
# Register
r = requests.post(BASE + "/franchisees", json={"id": "team-alpha", "name": "Alpha Cutters"})
token = r.json()["token"]
s = requests.Session()
s.headers["Authorization"] = "Bearer " + token
# List available orders
orders = s.get(BASE + "/orders").json()
# Claim the first order
order_id = orders[0]["id"]
s.post(BASE + "/orders/" + order_id + "/claim", json={})
# Submit a cutting plan
s.post(BASE + "/orders/" + order_id + "/cutting-plan", json={
"placements": [{"pieceId": "...", "x": 0, "y": 0, "flipped": False}]
})
Prefer a generated client? Run:
npx @openapitools/openapi-generator-cli generate \
-i __SERVER__/openapi.yaml -g python -o ./laser-client
pip install -e ./laser-client
Generate a client with openapi-generator using the OkHttp + Gson library.
Generate
npx @openapitools/openapi-generator-cli generate \
-i __SERVER__/openapi.yaml \
-g java \
--library okhttp-gson \
-o ./laser-client
Add to your project
# Maven — add the generated pom.xml as a dependency, or copy sources directly
cd laser-client && mvn install
Usage
ApiClient client = Configuration.getDefaultApiClient();
client.setBasePath("__SERVER__");
client.addDefaultHeader("Authorization", "Bearer " + token);
OrdersApi api = new OrdersApi(client);
List<Order> orders = api.listOrders();
Uses oapi-codegen — generates idiomatic Go types and an
http.Client-based client.
Install & generate
go install github.com/oapi-codegen/oapi-codegen/v2/cmd/oapi-codegen@latest
curl __SERVER__/openapi.yaml -o openapi.yaml
oapi-codegen -generate types,client -package laser openapi.yaml > laser.go
Usage
import (
"context"
"net/http"
laser "your/module/laser"
)
func withToken(token string) laser.RequestEditorFn {
return func(ctx context.Context, req *http.Request) error {
req.Header.Set("Authorization", "Bearer "+token)
return nil
}
}
c, _ := laser.NewClientWithResponses("__SERVER__", laser.WithRequestEditorFn(withToken(token)))
resp, _ := c.ListOrdersWithResponse(context.Background())
orders := *resp.JSON200
Generate a client with NSwag — integrates well with .NET projects.
Install & generate
dotnet tool install -g NSwag.ConsoleCore
nswag openapi2csclient \
/input:__SERVER__/openapi.yaml \
/namespace:LaserCutting \
/output:LaserClient.cs
Usage
using LaserCutting;
var http = new HttpClient { BaseAddress = new Uri("__SERVER__") };
http.DefaultRequestHeaders.Authorization =
new AuthenticationHeaderValue("Bearer", token);
var client = new Client(http);
var orders = await client.ListOrdersAsync();
openapi-generator supports 50+ languages (Kotlin, Rust, PHP, Ruby, Swift, …).
List all generators
npx @openapitools/openapi-generator-cli list
Generate for your language
npx @openapitools/openapi-generator-cli generate \
-i __SERVER__/openapi.yaml \
-g <generator-name> \
-o ./laser-client
Replace <generator-name> with the value from the list above (e.g.
kotlin, rust, php).