All Mnemonic APIs by default are implemented as REST API supporting JSON standard.


The REST API endpoints are provided below:



Authenticated requests must include a valid API key.

REST HTTP clients need to pass a header key X-API-Key with the corresponding API key value with each request.

curl<endpoint> \
    -H "X-API-Key: YOUR_API_KEY_HERE" \'
import requests # requires `pip install requests`

result = requests.get(
    headers={'x-api-key': 'YOUR_API_KEY_HERE'}
const axios = require('axios');

const reqUrl = '';
const headers = { 'X-API-Key': 'YOUR_API_KEY_HERE' };

axios.get(reqUrl, { headers: headers })
  .then(response => {
  .catch(error => {
package main

import (

func main() {
  reqUrl := ""

  req, _ := http.NewRequest("GET", reqUrl, nil)
  req.Header.Add("X-API-Key", "YOUR_API_KEY_HERE")

gRPC / Protobuf

Mnemonic API also provide a gRPC interface.

A language-agnostic specification for this API is defined using Protocol Buffers (v3), which can be used to generate client libraries in a variety of programming languages.

The Protobuf source files can be found in Mnemonic public Buf repository.

Assets and Libraries

Mnemonic uses buf to generate and manage client libraries and documentation based on the Protobuf specification. Explore Buf documentation to learn more about how to generate clients in various languages.


Explore our buf-generated docs.


The gRPC API endpoints are provided below:



Authenticated requests must include a valid API key.

Note: In beta only one API key is issued per user. The key can be rotated if necessary upon request.

gRPC clients need to pass the key value as x-api-key in the metadata section of the RPC.

package main

import (


func main() {
    // ... your grpc client configuration
    c := pb.NewGreeterClient(conn)

    ctx := context.Background()
    ctx = metadata.AppendToOutgoingContext(ctx, "x-api-key", "YOUR_API_KEY_HERE")

    r, err := c.SayHello(ctx, &pb.HelloRequest{Name: name})
import grpc
import your_pb2
import your_pb2_grpc

def main():
    # ... your grpc client configuration
    channel = grpc.insecure_channel('your_grpc_server_address:port')
    stub = your_pb2_grpc.GreeterStub(channel)

    metadata = [('x-api-key', 'YOUR_API_KEY_HERE')]
    ctx = grpc.metadata_call_credentials(metadata)
    call_credentials = grpc.composite_call_credentials(grpc.ssl_channel_credentials(), ctx)
    secure_channel = grpc.secure_channel('your_grpc_server_address:port', call_credentials)
    secure_stub = your_pb2_grpc.GreeterStub(secure_channel)

    request = your_pb2.HelloRequest(name='your_name')
    response = secure_stub.SayHello(request)

if __name__ == '__main__':
const grpc = require('@grpc/grpc-js');
const protoLoader = require('@grpc/proto-loader');
const path = require('path');

const PROTO_PATH = path.join(__dirname, 'path/to/your/protofile.proto');
const packageDefinition = protoLoader.loadSync(PROTO_PATH, {
  keepCase: true,
  longs: String,
  enums: String,
  defaults: true,
  oneofs: true,

const yourProto = grpc.loadPackageDefinition(packageDefinition);
const GreeterService = yourProto.yourProtoPackageName.Greeter;

function main() {
  const client = new GreeterService(

  const metadata = new grpc.Metadata();
  metadata.add('x-api-key', 'YOUR_API_KEY_HERE');

  const request = {
    name: 'your_name',

  client.sayHello(request, metadata, (error, response) => {
    if (error) {
    } else {


You must provide a TLS configuration for the gRPC client connection.

creds := credentials.NewTLS(&tls.Config{})
conn, err = grpc.Dial(target, grpc.WithTransportCredentials(creds))
import grpc
import ssl

# ... your existing Python gRPC client code

# Create a secure channel using TLS
creds = grpc.ssl_channel_credentials()
secure_channel = grpc.secure_channel('your_grpc_server_address:port', creds)
stub = your_pb2_grpc.GreeterStub(secure_channel)

# ... the rest of your Python gRPC client code
const grpc = require('@grpc/grpc-js');
const fs = require('fs');

// ... your existing Node.js gRPC client code

// Create a secure channel using TLS
const creds = grpc.credentials.createSsl();
const secureClient = new GreeterService(

// ... the rest of your Node.js gRPC client code