# SDK & API — build private access into your product

> Publish a private resource, then issue access links from your application with the qURL SDKs or REST API.

Source: https://layerv.ai/sdk/

---

qURL™ SDK & API

# Build private access into your product.

Give a private resource a cryptographic identity, then let your code issue access for each task. Your app stays off the public internet while people and AI agents get a verified way in. Build with Go, TypeScript, Python, or the REST API.

[Get an API key ↗](https://layerv.ai/qurl/dashboard/keys/) [Go SDK on GitHub ↗](https://github.com/layervai/qurl-go) [API reference](https://layerv.ai/docs/)

How it works

## Publish once. Create access from your code.

Each example creates a single-use link that can be opened within one hour. The session it starts then runs for its own configured length.

1. `QURL_RESOURCE_CRID` [Publish a private app](https://layerv.ai/start/) and save the CRID it returns.
2. `QURL_API_KEY` An application key from the resource owner’s account with `qurl:write`, not the key used for CLI enrollment.
3. Running Keep the app and its connector up. These calls issue links for it.

```
package main

import (
    "context"
    "fmt"
    "log"
    "os"
    "time"

    "github.com/layervai/qurl-go/qurl"
)

func main() {
    crid := os.Getenv("QURL_RESOURCE_CRID")
    if crid == "" {
        log.Fatal("Set QURL_RESOURCE_CRID from publish")
    }
    client, err := qurl.OpenClient()
    if err != nil { log.Fatal(err) }

    resource := client.ResourceByCRID(crid)
    portal, err := resource.CreatePortal(context.Background(),
        qurl.ValidFor(time.Hour), qurl.OneTimeUse())
    if err != nil { log.Fatal(err) }

    // Print only in this local example. Deliver privately in production; do not log.
    fmt.Println(portal.Link)
}
```

Publish once. Issue access as needed.

Your app keeps running on its host. Your code issues the link; the recipient uses it to reach that resource.

Examples use [Go v0.17.0](https://github.com/layervai/qurl-go/tree/v0.17.0), [TypeScript v0.7.0](https://github.com/layervai/qurl-typescript/tree/qurl-v0.7.0), and [Python v0.3.0](https://github.com/layervai/qurl-python/tree/v0.3.0). For programmatic opening of a received link, follow the [link-opening guide](https://github.com/layervai/qurl-go/blob/v0.17.0/docs/opening-links.md).

Go

go get github.com/layervai/qurl-go/qurl

TypeScript

npm install @layervai/qurl

Python

pip install qurl-python

Why it’s different

## The access layer you’d otherwise build yourself.

### Your app stays private

Keep the origin private. LayerV checks authorization before opening the protected origin connection; your code decides when to issue access.

### Expiry is built in

Issue a fresh link for each task, choose its lifetime and use limits, and revoke access when the work is done. Keep your app’s sign-in for user identity.

### Keep identity separate from location

Save the CRID once. It identifies the resource by its key, while each signed link grants fresh access. A compatible opener verifies the grant against that identity.

## Your first link is one call away.

Publish your app with the quickstart, then build access-link creation into your application.

[Open the quickstart ↗](https://layerv.ai/start/) [API reference](https://layerv.ai/docs/)



---

*This markdown version is auto-generated from [https://layerv.ai/sdk/](https://layerv.ai/sdk/) for AI agents. Curated agent resources: [llms.txt](https://layerv.ai/llms.txt). For the full interactive experience, visit the HTML version.*

