BluefinNetworkToken SDK

BluefinNetworkToken SDK

Network Token Bundle client, generated from the OpenAPI spec.

The purpose of the ShieldConex API’s are to provide ability to tokenize/detokenize data

Learn more about Network Token Bundle at secure-cert.shieldconex.com.

This is an unofficial SDK for the Network Token Bundle public API, generated by Voxgig with @voxgig/sdkgen. It is not affiliated with, endorsed by, or sponsored by the upstream API provider.

Learn more about Voxgig SDKs at voxgig.com/sdk.

TypeScript, Python, PHP, Golang, Ruby, Lua, C, Clojure, C++, C#, Dart, Elixir, Haskell, Java, JavaScript, Kotlin, OCaml, Perl, Rust, Scala, Swift, Zig SDKs, a CLI, an interactive REPL, and an MCP server for AI agents — all generated from one OpenAPI spec by @voxgig/sdkgen.

Entities, not endpoints

This SDK exposes the API as a small set of semantic entities — NetworkTokenBundle — that you call directly, instead of assembling URL paths and query strings. Entities are Capitalised to mark them as the primary surface, each with the operations they support (load, create, remove):

const client = new BluefinNetworkTokenSDK()
const networktokenbundle = await client.NetworkTokenBundle().load()

Thinking in entities keeps the mental model small — for people and AI agents alike — rather than reasoning about raw HTTP routes and query parameters.

Offline unit testing

Every SDK ships a built-in test mode that swaps the HTTP transport for an in-memory mock, so your unit tests run fully offline — no server, no network, and no credentials:

TypeScript

const client = BluefinNetworkTokenSDK.test()
const networktokenbundle = await client.NetworkTokenBundle().load({ id: 'test01' })
// networktokenbundle is a bare NetworkTokenBundle populated with mock data
console.log(networktokenbundle)

Python

client = BluefinNetworkTokenSDK.test()
networktokenbundle = client.NetworkTokenBundle().load({"id": "test01"})
print(networktokenbundle)

PHP

// Seed fixture data so offline calls resolve without a live server.
$client = BluefinNetworkTokenSDK::test([
    "entity" => ["networktokenbundle" => ["test01" => ["id" => "test01"]]],
]);
$networktokenbundle = $client->NetworkTokenBundle()->load(["id" => "test01"]);

Golang

client := sdk.Test()
result, err := client.NetworkTokenBundle(nil).Load(
    map[string]any{"id": "test01"}, nil,
)

Ruby

# Seed fixture data so offline calls resolve without a live server.
client = BluefinNetworkTokenSDK.test({
  "entity" => { "networktokenbundle" => { "test01" => { "id" => "test01" } } },
})
networktokenbundle = client.NetworkTokenBundle.load({ "id" => "test01" })

Lua

local client = sdk.test()
local result, err = client:NetworkTokenBundle():load({ id = "test01" })

C

#include "core/api.h"

BluefinNetworkTokenSDK* client = test_sdk(NULL, NULL);
PNError* err = NULL;
Entity* network_token_bundle = bluefinnetworktoken_network_token_bundle(client, NULL);
voxgig_value* network_token_bundle_rec = network_token_bundle->vt->load(network_token_bundle, cmap(1, "id", v_str("test01")), NULL, &err);
printf("%s\n", voxgig_to_json(network_token_bundle_rec));

Clojure

(require '[sdk.api :as api]
         '[sdk.entity.network_token_bundle :as e-network_token_bundle]
         '[voxgig.struct :as vs])

(def client (api/test-sdk nil nil))
(def network_token_bundle (e-network_token_bundle/load (api/network_token_bundle client nil) (vs/jm "id" "test01") nil))
(println network_token_bundle)

C++

auto client = BluefinNetworkTokenSDK::testSDK();
Value network_token_bundle = client->network_token_bundle()->load(vmap({{"id", Value("test01")}}), Value::undef());
std::cout << Struct::jsonify(network_token_bundle) << std::endl;

C#

var client = BluefinNetworkTokenSDK.TestSDK(null, null);
var networkTokenBundle = client.NetworkTokenBundle().Load(new Dictionary<string, object?> { ["id"] = "test01" });
Console.WriteLine(networkTokenBundle);

Dart

import 'package:bluefin_network_token_sdk/BluefinNetworkTokenSDK.dart';

Future<void> main() async {
  final client = BluefinNetworkTokenSDK.test();
  final networktokenbundle = await client.NetworkTokenBundle().load({'id': 'test01'});
  print(networktokenbundle);
}

Elixir

alias BluefinNetworkToken.Helpers, as: H

sdk = BluefinNetworkToken.test()
network_token_bundle = BluefinNetworkToken.network_token_bundle(sdk)
record = BluefinNetworkToken.Entity.NetworkTokenBundle.load(network_token_bundle, H.deep(%{"id" => "test01"}))
IO.inspect(record)

Haskell

import qualified SdkClient as Sdk
import VoxgigStruct (Value (..), emptyMap)
import SdkHelpers (jo)

main :: IO ()
main = do
  sdk <- Sdk.testSdk0
  ent <- Sdk.network_token_bundle sdk VNoval
  arg <- jo [("id", VStr "test01")]
  ctrl <- emptyMap
  network_token_bundle <- Sdk.eLoad ent arg ctrl
  print network_token_bundle

Java

BluefinNetworkTokenSDK client = BluefinNetworkTokenSDK.testSDK(null, null);
Object networkTokenBundle = client.networkTokenBundle(null).load(Map.of("id", "test01"), null);
System.out.println(networkTokenBundle);

JavaScript

const client = BluefinNetworkTokenSDK.test()
const networktokenbundle = await client.NetworkTokenBundle().load({ id: 'test01' })
// networktokenbundle is a bare entity populated with mock data
console.log(networktokenbundle)

Kotlin

val client = BluefinNetworkTokenSDK.testSDK(null, null)
val networkTokenBundle = client.networkTokenBundle(null).load(mutableMapOf<String, Any?>("id" to "test01"), null)
println(networkTokenBundle)

OCaml

let () =
  let client = Sdk_client.test () in
  let result = (Sdk_client.network_token_bundle client Noval).e_load (jo [("id", (Str "test01"))]) Noval in
  print_endline (stringify result)

Perl

use lib 'perl/lib';
use BluefinNetworkTokenSDK;

my $client = BluefinNetworkTokenSDK->test(undef, undef);
my $networktokenbundle = $client->NetworkTokenBundle->load({ 'id' => 'test01' });
print "$networktokenbundle->{id}\n";

Rust

use bluefin_network_token_sdk::{jo, test_sdk, Value};

let client = test_sdk(Value::Noval, Value::Noval);
let network_token_bundle = client.network_token_bundle(Value::Noval).load(jo(vec![("id", Value::str("test01"))]), Value::Noval).unwrap();
println!("{:?}", network_token_bundle);

Scala

val client = BluefinNetworkTokenSDK.testSDK(null, null)
val networkTokenBundle = client.networkTokenBundle(null).load(java.util.Map.of("id", "test01"), null)
println(networkTokenBundle)

Swift

let client = BluefinNetworkTokenSDK.testSDK(nil, nil)
let networkTokenBundle = try client.NetworkTokenBundle().load(VMap([("id", .string("test01"))]), nil)
print(networkTokenBundle)

Zig

const std = @import("std");
const sdk = @import("sdk");
const h = sdk.h;

const client = sdk.test_sdk(h.vnull(), h.vnull());
switch (client.network_token_bundle(h.vnull()).load(h.jo(&.{.{ "id", h.vstr("test01") }}), h.vnull())) {
    .ok => |network_token_bundle| std.debug.print("{s}\n", .{h.stringify(network_token_bundle)}),
    .err => |e| std.debug.print("load failed: {s}\n", .{e.msg}),
}

Packages

LanguagePackageInstall
TypeScript@voxgig-sdk/bluefin-network-tokenpublish pending — install from git tag
Pythonvoxgig-sdk-bluefin-network-tokenpublish pending — install from git tag
PHPvoxgig-sdk/bluefin-network-tokenpublish pending — install from git tag
Golanggithub.com/voxgig-sdk/bluefin-network-token-sdk/gogo get github.com/voxgig-sdk/bluefin-network-token-sdk/go@latest
Rubyvoxgig-sdk-bluefin-network-tokenpublish pending — install from git tag
Luavoxgig-sdk-bluefin-network-tokenpublish pending — install from git tag
Cvoxgig-sdk-bluefin-network-tokenpublish pending — install from git tag
Clojurevoxgig-sdk-bluefin-network-tokenpublish pending — install from git tag
C++voxgig-sdk-bluefin-network-tokenpublish pending — install from git tag
C#voxgig-sdk-bluefin-network-tokenpublish pending — install from git tag
Dartvoxgig-sdk-bluefin-network-tokenpublish pending — install from git tag
Elixirvoxgig-sdk-bluefin-network-tokenpublish pending — install from git tag
Haskellvoxgig-sdk-bluefin-network-tokenpublish pending — install from git tag
Javavoxgig-sdk-bluefin-network-tokenpublish pending — install from git tag
JavaScript@voxgig-sdk/bluefin-network-token-jspublish pending — install from git tag
Kotlinvoxgig-sdk-bluefin-network-tokenpublish pending — install from git tag
OCamlvoxgig-sdk-bluefin-network-tokenpublish pending — install from git tag
Perlvoxgig-sdk-bluefin-network-tokenpublish pending — install from git tag
Rustvoxgig-sdk-bluefin-network-tokenpublish pending — install from git tag
Scalavoxgig-sdk-bluefin-network-tokenpublish pending — install from git tag
Swiftvoxgig-sdk-bluefin-network-tokenpublish pending — install from git tag
Zigvoxgig-sdk-bluefin-network-tokenpublish pending — install from git tag
Go CLIgithub.com/voxgig-sdk/bluefin-network-token-sdk/go-cligo install github.com/voxgig-sdk/bluefin-network-token-sdk/go-cli/cmd/bluefin-network-token@latest
Go MCP servergithub.com/voxgig-sdk/bluefin-network-token-sdk/go-mcpgo get github.com/voxgig-sdk/bluefin-network-token-sdk/go-mcp@latest

Quickstart

TypeScript

import { BluefinNetworkTokenSDK } from '@voxgig-sdk/bluefin-network-token'

const client = new BluefinNetworkTokenSDK({
  apikey: process.env.BLUEFIN_NETWORK_TOKEN_APIKEY,
})

// Load networktokenbundle data (returns a NetworkTokenBundle)
const networktokenbundle = await client.NetworkTokenBundle().load()
console.log(networktokenbundle)

See the TypeScript README for the full guide.

Surfaces

SurfacePath
SDK (TypeScript, Python, PHP, Golang, Ruby, Lua, C, Clojure, C++, C#, Dart, Elixir, Haskell, Java, JavaScript, Kotlin, OCaml, Perl, Rust, Scala, Swift, Zig)ts/ py/ php/ go/ rb/ lua/ c/ clojure/ cpp/ csharp/ dart/ elixir/ haskell/ java/ js/ kotlin/ ocaml/ perl/ rust/ scala/ swift/ zig/
CLIgo-cli/
MCP servergo-mcp/

Use it from an AI agent (MCP)

The generated MCP server exposes every operation in this SDK as an MCP tool that Claude, Cursor or Cline can call directly. Build and register it:

cd go-mcp && go build -o bluefin-network-token-mcp .

Then add it to your agent’s MCP config (Claude Desktop, Cursor, etc.):

{
  "mcpServers": {
    "bluefin-network-token": {
      "command": "/abs/path/to/bluefin-network-token-mcp"
    }
  }
}

Entities

The API exposes one entity:

EntityDescriptionAPI path
NetworkTokenBundleThe NetworkTokenBundle entity (create, load, remove)./network-token-bundle

The operations available across these entities are load, create, remove — see each entity’s own list above for exactly which it supports.

Quickstart in other languages

Python

import os
from bluefinnetworktoken_sdk import BluefinNetworkTokenSDK

client = BluefinNetworkTokenSDK({
    "apikey": os.environ.get("BLUEFIN_NETWORK_TOKEN_APIKEY"),
})


# Load a specific networktokenbundle (returns the record, raises on error)
networktokenbundle = client.NetworkTokenBundle().load({"id": "example_id"})
print(networktokenbundle)

PHP

<?php
require_once 'bluefinnetworktoken_sdk.php';

$client = new BluefinNetworkTokenSDK([
    "apikey" => getenv("BLUEFIN_NETWORK_TOKEN_APIKEY"),
]);


// Load a specific networktokenbundle (returns the bare record; throws on error)
$networktokenbundle = $client->NetworkTokenBundle()->load(["id" => "example_id"]);
print_r($networktokenbundle);

Golang

import sdk "github.com/voxgig-sdk/bluefin-network-token-sdk/go"

client := sdk.NewBluefinNetworkTokenSDK(map[string]any{
    "apikey": os.Getenv("BLUEFIN_NETWORK_TOKEN_APIKEY"),
})

// Load networktokenbundle data
networkTokenBundle, err := client.NetworkTokenBundle(nil).Load(map[string]any{"id": "example_id"}, nil)
if err != nil {
    panic(err)
}
fmt.Println(networkTokenBundle)

Ruby

require_relative "BluefinNetworkToken_sdk"

client = BluefinNetworkTokenSDK.new({
  "apikey" => ENV["BLUEFIN_NETWORK_TOKEN_APIKEY"],
})


# Load a specific networktokenbundle (returns the bare record; raises on error)
networktokenbundle = client.NetworkTokenBundle.load({ "id" => "example_id" })
puts networktokenbundle

Lua

local sdk = require("bluefin-network-token_sdk")

local client = sdk.new({
  apikey = os.getenv("BLUEFIN_NETWORK_TOKEN_APIKEY"),
})


-- Load a specific networktokenbundle
local networktokenbundle, err = client:NetworkTokenBundle():load({ id = "example_id" })
print(networktokenbundle)

C

#include "core/api.h"

BluefinNetworkTokenSDK* client = bluefinnetworktoken_sdk_new(cmap(1,
    "apikey", v_str(getenv("BLUEFIN_NETWORK_TOKEN_APIKEY"))));
PNError* err = NULL;


Entity* network_token_bundle = bluefinnetworktoken_network_token_bundle(client, NULL);
// Load a specific networktokenbundle (returns the record, sets *err on failure)
voxgig_value* network_token_bundle_rec = network_token_bundle->vt->load(network_token_bundle, cmap(1, "id", v_str("example_id")), NULL, &err);
printf("%s\n", voxgig_to_json(network_token_bundle_rec));

Clojure

(require '[sdk.api :as api]
         '[sdk.entity.network_token_bundle :as e-network_token_bundle]
         '[voxgig.struct :as vs])

(def client (api/make-sdk (vs/jm "apikey" (System/getenv "BLUEFIN_NETWORK_TOKEN_APIKEY"))))


;; Load a specific network_token_bundle (returns the record, raises on error)
(def network_token_bundle (e-network_token_bundle/load (api/network_token_bundle client nil) (vs/jm "id" "example_id") nil))
(println network_token_bundle)

C++

#include <cstdlib>
#include "core/sdk.hpp"

using namespace sdk;

const char* apikey = std::getenv("BLUEFIN_NETWORK_TOKEN_APIKEY");
auto client = std::make_shared<BluefinNetworkTokenSDK>(vmap({
    {"apikey", Value(apikey ? apikey : "")},
}));


// Load a specific network_token_bundle (returns the record, throws on error)
Value network_token_bundle = client->network_token_bundle()->load(vmap({{"id", Value("example_id")}}), Value::undef());
std::cout << Struct::jsonify(network_token_bundle) << std::endl;

C#

using BluefinNetworkTokenSdk;

var client = new BluefinNetworkTokenSDK(new Dictionary<string, object?>
{
    ["apikey"] = Environment.GetEnvironmentVariable("BLUEFIN_NETWORK_TOKEN_APIKEY"),
});


// Load a specific networktokenbundle (returns the record, raises on error)
var networkTokenBundle = client.NetworkTokenBundle().Load(new Dictionary<string, object?> { ["id"] = "example_id" });
Console.WriteLine(networkTokenBundle);

Dart

import 'dart:io';
import 'package:bluefin_network_token_sdk/BluefinNetworkTokenSDK.dart';

Future<void> main() async {
  final client = BluefinNetworkTokenSDK({
    'apikey': Platform.environment['BLUEFIN_NETWORK_TOKEN_APIKEY'],
  });


  // Load a specific networktokenbundle (returns the record, throws on error)
  final networktokenbundle = await client.NetworkTokenBundle().load({'id': 'example_id'});
  print(networktokenbundle);
}

Elixir

alias BluefinNetworkToken.Helpers, as: H

sdk = BluefinNetworkToken.new(H.deep(%{"apikey" => System.get_env("BLUEFIN_NETWORK_TOKEN_APIKEY")}))

network_token_bundle = BluefinNetworkToken.network_token_bundle(sdk)

# Load a specific networktokenbundle (returns the record, raises on error)
record = BluefinNetworkToken.Entity.NetworkTokenBundle.load(network_token_bundle, H.deep(%{"id" => "example_id"}))
IO.inspect(record)

Haskell

import System.Environment (lookupEnv)
import qualified SdkClient as Sdk
import VoxgigStruct (Value (..), emptyMap)
import SdkHelpers (jo)

main :: IO ()
main = do
  mkey <- lookupEnv "BLUEFIN_NETWORK_TOKEN_APIKEY"
  opts <- jo [("apikey", maybe VNoval VStr mkey)]
  sdk <- Sdk.newSdk opts

  -- Load a specific networktokenbundle (returns the record, raises on error)
  ent2 <- Sdk.network_token_bundle sdk VNoval
  m <- jo [("id", VStr "example_id")]
  ctrl2 <- emptyMap
  network_token_bundle <- Sdk.eLoad ent2 m ctrl2
  print network_token_bundle

Java

import voxgig.bluefinnetworktokensdk.core.BluefinNetworkTokenSDK;

Map<String, Object> options = new java.util.LinkedHashMap<>();
options.put("apikey", System.getenv("BLUEFIN_NETWORK_TOKEN_APIKEY"));
BluefinNetworkTokenSDK client = new BluefinNetworkTokenSDK(options);


// Load a specific networktokenbundle (returns the record, raises on error)
Object networkTokenBundle = client.networkTokenBundle(null).load(Map.of("id", "example_id"), null);
System.out.println(networkTokenBundle);

JavaScript

const { BluefinNetworkTokenSDK } = require('@voxgig-sdk/bluefin-network-token-js')

const client = new BluefinNetworkTokenSDK({
  apikey: process.env.BLUEFIN_NETWORK_TOKEN_APIKEY,
})

Kotlin

import voxgig.bluefinnetworktokensdk.core.BluefinNetworkTokenSDK

val client = BluefinNetworkTokenSDK(mutableMapOf<String, Any?>(
    "apikey" to System.getenv("BLUEFIN_NETWORK_TOKEN_APIKEY"),
))


// Load a specific networktokenbundle (returns the record, raises on error)
val networkTokenBundle = client.networkTokenBundle(null).load(mutableMapOf<String, Any?>("id" to "example_id"), null)
println(networkTokenBundle)

OCaml

open Voxgig_struct
open Sdk_helpers

let () =
  let client = Sdk_client.make (jo [("apikey", Str (Sys.getenv "BLUEFIN_NETWORK_TOKEN_APIKEY"))]) in
  (* Load a specific network_token_bundle (returns the record; raises on error) *)
  let network_token_bundle = (Sdk_client.network_token_bundle client Noval).e_load (jo [("id", (Str "example_id"))]) Noval in
  print_endline (stringify network_token_bundle)

Perl

use lib 'perl/lib';
use BluefinNetworkTokenSDK;

my $client = BluefinNetworkTokenSDK->new({
    'apikey' => $ENV{'BLUEFIN_NETWORK_TOKEN_APIKEY'},
});


# Load a specific networktokenbundle (returns the bare record; dies on error)
my $networktokenbundle = $client->NetworkTokenBundle->load({ 'id' => 'example_id' });
print "$networktokenbundle->{id}\n";

Rust

use bluefin_network_token_sdk::{jo, BluefinNetworkTokenSDK, Value};

let client = BluefinNetworkTokenSDK::new(jo(vec![
    ("apikey", Value::str(std::env::var("BLUEFIN_NETWORK_TOKEN_APIKEY").unwrap_or_default())),
]));


// Load a specific networktokenbundle (returns the record, Err on failure)
let network_token_bundle = client.network_token_bundle(Value::Noval).load(jo(vec![("id", Value::str("example_id"))]), Value::Noval).unwrap();
println!("{:?}", network_token_bundle);

Scala

import voxgig.bluefinnetworktokensdk.core.BluefinNetworkTokenSDK

val options = new java.util.LinkedHashMap[String, Object]()
options.put("apikey", System.getenv("BLUEFIN_NETWORK_TOKEN_APIKEY"))
val client = new BluefinNetworkTokenSDK(options)


// Load a specific networktokenbundle (returns the record, raises on error)
val networkTokenBundle = client.networkTokenBundle(null).load(java.util.Map.of("id", "example_id"), null)
println(networkTokenBundle)

Swift

import BluefinNetworkTokenSdk

let options = VMap()
options.entries["apikey"] = .string(
    ProcessInfo.processInfo.environment["BLUEFIN_NETWORK_TOKEN_APIKEY"] ?? "")
let client = BluefinNetworkTokenSDK(options)


// Load a specific networktokenbundle (returns the record, throws on error)
let networkTokenBundle = try client.NetworkTokenBundle().load(VMap([("id", .string("example_id"))]), nil)
print(networkTokenBundle)

Zig

const std = @import("std");
const sdk = @import("sdk");
const h = sdk.h;

const client = sdk.BluefinNetworkTokenSDK.new(h.jo(&.{
    .{ "apikey", h.vstr(std.posix.getenv("BLUEFIN_NETWORK_TOKEN_APIKEY") orelse "") },
}));


// Load a specific networktokenbundle (Ok is the record, .err on failure)
switch (client.network_token_bundle(h.vnull()).load(h.jo(&.{.{ "id", h.vstr("example_id") }}), h.vnull())) {
    .ok => |network_token_bundle| std.debug.print("{s}\n", .{h.stringify(network_token_bundle)}),
    .err => |e| std.debug.print("load failed: {s}\n", .{e.msg}),
}

Direct and prepare

For endpoints the entity model doesn’t cover, use the low-level methods:

  • direct(fetchargs) — build and send an HTTP request in one step.
  • prepare(fetchargs) — build the request without sending it.

Both accept a map with path, method, params, query, headers, and body. See the How-to guides below.

How-to guides

Make a direct API call

When the entity interface does not cover an endpoint, use direct:

TypeScript:

const result = await client.direct({
  path: '/api/resource/{id}',
  method: 'GET',
  params: { id: 'example' },
})
if (result instanceof Error) {
  throw result
}
console.log(result.data)

Python:

result = client.direct({
    "path": "/api/resource/{id}",
    "method": "GET",
    "params": {"id": "example"},
})

PHP:

$result = $client->direct([
    "path" => "/api/resource/{id}",
    "method" => "GET",
    "params" => ["id" => "example"],
]);

Go:

result, err := client.Direct(map[string]any{
    "path":   "/api/resource/{id}",
    "method": "GET",
    "params": map[string]any{"id": "example"},
})
if err != nil {
    panic(err)
}
fmt.Println(result)

Ruby:

result = client.direct({
  "path" => "/api/resource/{id}",
  "method" => "GET",
  "params" => { "id" => "example" },
})

Lua:

local result, err = client:direct({
  path = "/api/resource/{id}",
  method = "GET",
  params = { id = "example" },
})

C:

PNError* err = NULL;
voxgig_value* result = sdk_direct(client, cmap(3,
    "path", v_str("/api/resource/{id}"),
    "method", v_str("GET"),
    "params", cmap(1, "id", v_str("example"))), &err);

Clojure:

(def result
  (api/direct client
    (vs/jm "path" "/api/resource/{id}"
           "method" "GET"
           "params" (vs/jm "id" "example"))))

C++:

Value result = client->direct(vmap({
    {"path", Value("/api/resource/{id}")},
    {"method", Value("GET")},
    {"params", vmap({{"id", Value("example")}})},
}));

C#:

var result = client.Direct(new Dictionary<string, object?>
{
    ["path"] = "/api/resource/{id}",
    ["method"] = "GET",
    ["params"] = new Dictionary<string, object?> { ["id"] = "example" },
});

Dart:

final result = await client.direct({
  'path': '/api/resource/{id}',
  'method': 'GET',
  'params': {'id': 'example'},
});

Elixir:

result = BluefinNetworkToken.direct(sdk, BluefinNetworkToken.Helpers.deep(%{
  "path" => "/api/resource/{id}",
  "method" => "GET",
  "params" => %{"id" => "example"}
}))

Haskell:

import qualified SdkClient as Sdk
import qualified SdkFeatures as F
import VoxgigStruct (Value (..))
import SdkHelpers (jo)

main :: IO ()
main = do
  sdk <- Sdk.newSdk0
  params <- jo [("id", VStr "example")]
  args <- jo [("path", VStr "/api/resource/{id}"), ("method", VStr "GET"), ("params", params)]
  result <- F.direct sdk args
  print result

Java:

Map<String, Object> result = client.direct(Map.of(
    "path", "/api/resource/{id}",
    "method", "GET",
    "params", Map.of("id", "example")));

JavaScript:

const result = await client.direct({
  path: '/api/resource/{id}',
  method: 'GET',
  params: { id: 'example' },
})
if (result instanceof Error) {
  throw result
}
console.log(result.data)

Kotlin:

val result = client.direct(mutableMapOf<String, Any?>(
    "path" to "/api/resource/{id}",
    "method" to "GET",
    "params" to mapOf("id" to "example")))

OCaml:

let result = Sdk_client.direct client (jo [
    ("path", Str "/api/resource/{id}");
    ("method", Str "GET");
    ("params", jo [("id", Str "example")]);
]) in
ignore result

Perl:

my $result = $client->direct({
    'path' => '/api/resource/{id}',
    'method' => 'GET',
    'params' => { 'id' => 'example' },
});

Rust:

let result = client.direct(jo(vec![
    ("path", Value::str("/api/resource/{id}")),
    ("method", Value::str("GET")),
    ("params", jo(vec![("id", Value::str("example"))])),
]));

Scala:

val result = client.direct(java.util.Map.of(
    "path", "/api/resource/{id}",
    "method", "GET",
    "params", java.util.Map.of("id", "example")))

Swift:

let result = client.direct(VMap([
    ("path", .string("/api/resource/{id}")),
    ("method", .string("GET")),
    ("params", .map([("id", .string("example"))])),
]))

Zig:

const result = client.direct(h.jo(&.{
    .{ "path", h.vstr("/api/resource/{id}") },
    .{ "method", h.vstr("GET") },
    .{ "params", h.jo(&.{.{ "id", h.vstr("example") }}) },
}));

Advanced

Everyday use only needs the sections above. This explains the internals behind every call — relevant when writing custom features.

Every SDK call runs the same five-stage pipeline:

  1. Point — resolve the API endpoint from the operation definition.
  2. Spec — build the HTTP specification (URL, method, headers, body).
  3. Request — send the HTTP request.
  4. Response — receive and parse the response.
  5. Result — extract the result data for the caller.

A feature hook fires at each stage (e.g. PrePoint, PreSpec, PreRequest), so features can inspect or modify the pipeline without forking the SDK.

Features

FeaturePurpose
TestFeatureIn-memory mock transport for testing without a live server

Pass custom features via the extend option at construction time.

Per-language documentation

Upstream API

This SDK is generated from the upstream OpenAPI specification. It is an unofficial client and is not affiliated with the API provider.

Security

Please report security issues to security@voxgig.com. See SECURITY.md. Do not open public issues for suspected vulnerabilities.


Generated from the Network Token Bundle OpenAPI spec by @voxgig/sdkgen.

Get the Voxgig dispatch

Short notes on building SDKs, CLIs, REPLs, and MCPs for API-first teams, plus the occasional Fireside episode pick.

By signing up you agree to our Terms and Conditions.