stability_ai 1.0.0 icon indicating copy to clipboard operation
stability_ai: ^1.0.0 copied to clipboard

A simple gRPC client for StabilityAI

A simple gRPC client for StabilityAI. Most of the heavy lifting is done by auto generated code from Stability-AI's Protocol Buffer Definitions.

Features #

It can access the following APIs:

Getting started #

To install this package, run:

dart pub add stability_ai

Usage #

import 'package:stability_ai/stability_ai.dart';

// initialize client with API Key.
// get it from and navigate to API Key.
var client = StabilityAIClient(apiKey);

// This is the text-to-image generation service
var generationService = client.generation;

// create a text prompt request. Let's generate some cats!
var req = Request(prompt: [Prompt(text: "lol cats")]);

// send the request. The response is a stream.
var rsp = client.generation.generate(req);

// we just print out all response answers.
rsp.listen((answer) {