feature/ci-ruby-gems
claude/smbcloud-github-app-k9641p
development
feature/apps
feature/build-release
feature/ci-docs
feature/ci-ruby-gems
feature/cicd
feature/completion
feature/dist-nuget
feature/fix-ci-sdk-pypi-rubygem
feature/fix-clippy-on-stable-channel
feature/fix-deployment-script
feature/github-email
feature/gresiq-v1
feature/project-new-structure
feature/rsync-deploy
feature/ruby-runner
feature/sdk-npm
feature/sdk-workflows
feature/smbcloud-cli-release-npm
feature/smbcloud-deploy
feature/wasm
main
release/v0.7.4
| 1 | # smbcloud-gresiq-sdk |
| 2 | |
| 3 | Rust client for the smbCloud GresIQ REST gateway. It handles API-key authenticated app management and model assignment for [Onde Inference](https://ondeinference.com). |
| 4 | |
| 5 | ## What is GresIQ? |
| 6 | |
| 7 | GresIQ is a managed-database layer inside smbCloud. It sits in front of a PostgreSQL database, adds API-key auth, and exposes a simple REST interface. This SDK handles HTTP transport and auth headers. |
| 8 | |
| 9 | ## Installation |
| 10 | |
| 11 | ```toml |
| 12 | [dependencies] |
| 13 | smbcloud-gresiq-sdk = "0.3" |
| 14 | ``` |
| 15 | |
| 16 | ## Quick start |
| 17 | |
| 18 | ```rust |
| 19 | use smbcloud_gresiq_sdk::{Environment, GresiqClient, GresiqCredentials}; |
| 20 | use serde::Serialize; |
| 21 | |
| 22 | #[derive(Serialize)] |
| 23 | struct Hit { path: String, status: u16 } |
| 24 | |
| 25 | #[tokio::main] |
| 26 | async fn main() -> anyhow::Result<()> { |
| 27 | let client = GresiqClient::from_credentials( |
| 28 | Environment::Production, |
| 29 | GresiqCredentials { |
| 30 | api_key: "your-api-key", |
| 31 | api_secret: "your-api-secret", |
| 32 | }, |
| 33 | ); |
| 34 | client.insert("hits", &Hit { path: "/api/chat".into(), status: 200 }).await?; |
| 35 | Ok(()) |
| 36 | } |
| 37 | ``` |
| 38 | |
| 39 | ## Onde Inference app and model management |
| 40 | |
| 41 | ```rust |
| 42 | use smbcloud_gresiq_sdk::{ |
| 43 | Environment, list_apps, create_app, list_models, assign_model, rename_app, |
| 44 | }; |
| 45 | |
| 46 | // List all apps for the authenticated user |
| 47 | let apps = list_apps(&Environment::Production, APP_ID, APP_SECRET, &token).await?; |
| 48 | |
| 49 | // Create a new app |
| 50 | let app = create_app(&Environment::Production, APP_ID, APP_SECRET, &token, "My App").await?; |
| 51 | |
| 52 | // List available models and assign one |
| 53 | let models = list_models(&Environment::Production, APP_ID, APP_SECRET, &token).await?; |
| 54 | assign_model(&Environment::Production, APP_ID, APP_SECRET, &token, &app.id, &models[0].id).await?; |
| 55 | |
| 56 | // Rename an existing app |
| 57 | rename_app(&Environment::Production, APP_ID, APP_SECRET, &token, &app.id, "Renamed App").await?; |
| 58 | ``` |
| 59 | |
| 60 | ## Key types |
| 61 | |
| 62 | | Type | Description | |
| 63 | | ------------------- | ---------------------------------------------------------------- | |
| 64 | | `GresiqClient` | Low-level insert client for generic row writes | |
| 65 | | `GresiqCredentials` | API key and secret pair | |
| 66 | | `GresiqError` | `Http` (network failure) or `Api` (non-2xx with body) | |
| 67 | | `OndeApp` | Registered Onde app (id, name, status, secret, current model id) | |
| 68 | | `OndeModel` | Catalog model (id, name, family, format, approx size bytes) | |
| 69 | | `Environment` | `Dev` or `Production` | |
| 70 | |
| 71 | For the broader product, see [smbCloud](https://smbcloud.xyz/) and related [platform docs](https://smbcloud.xyz/posts). |
| 72 | |
| 73 | ## License |
| 74 | |
| 75 | Apache-2.0 |
| 76 | |
| 77 | ## Copyright |
| 78 | |
| 79 | © 2026 [smbCloud](https://smbcloud.xyz) (Splitfire AB). |