TypeScript
Python
const node = new GenerateText({ prompt: "Who is Don Quixote?", temperature: 0.4, max_tokens: 800,})
Output
{ "text": "Don Quixote is a fictional character in the novel of the same name by Miguel de Cervantes."}
Generate text using a language model.
prompt
string
Input prompt.
Sampling temperature to use. Higher values make the output more random, lower values make the output more deterministic.
0.4
Maximum number of tokens to generate.
Selected node.
Mistral7BInstruct
Mixtral8x7BInstruct
Llama3Instruct8B
Llama3Instruct70B
Mistral7BInstruct
Generate multiple text choices using a language model.
prompt
string
Input prompt.
num_choices
integer[1..8]
Number of choices to generate.
1
Sampling temperature to use. Higher values make the output more random, lower values make the output more deterministic.
0.4
Maximum number of tokens to generate.
Selected node.
Mistral7BInstruct
Mixtral8x7BInstruct
Llama3Instruct8B
Llama3Instruct70B
Mistral7BInstruct
Generate text for multiple prompts in batch using a language model.
prompts
array[string]
Batch input prompts.
Sampling temperature to use. Higher values make the output more random, lower values make the output more deterministic.
0.4
Maximum number of tokens to generate.
Generate JSON using a language model.
prompt
string
Input prompt.
json_schema
object
JSON schema to guide json_object
response.
Sampling temperature to use. Higher values make the output more random, lower values make the output more deterministic.
0.4
Maximum number of tokens to generate.
Selected node.
Mistral7BInstruct
Mixtral8x7BInstruct
Mistral7BInstruct
Generate multiple JSON choices using a language model.
prompt
string
Input prompt.
json_schema
object
JSON schema to guide json_object
response.
num_choices
integer[1..8]
Number of choices to generate.
2
Sampling temperature to use. Higher values make the output more random, lower values make the output more deterministic.
0.4
Maximum number of tokens to generate.
Selected node.
Mistral7BInstruct
Mixtral8x7BInstruct
Mistral7BInstruct
Generate JSON for multiple prompts in batch using a language model.
prompts
array[string]
Batch input prompts.
json_schema
object
JSON schema to guide json_object
response.
Sampling temperature to use. Higher values make the output more random, lower values make the output more deterministic.
0.4
Maximum number of tokens to generate.
Generate text with image input.
prompt
string
Text prompt.
image_uris
array[string]
Image prompts.
Maximum number of tokens to generate.
800
Generate text using Mistral 7B Instruct.
prompt
string
Input prompt.
Number of choices to generate.
1
JSON schema to guide response.
Sampling temperature to use. Higher values make the output more random, lower values make the output more deterministic.
Maximum number of tokens to generate.
Generate text using instruct-tuned Mixtral 8x7B.
prompt
string
Input prompt.
Number of choices to generate.
1
JSON schema to guide response.
Sampling temperature to use. Higher values make the output more random, lower values make the output more deterministic.
Maximum number of tokens to generate.
Generate text using instruct-tuned Llama 3 8B.
prompt
string
Input prompt.
Number of choices to generate.
1
Sampling temperature to use. Higher values make the output more random, lower values make the output more deterministic.
Maximum number of tokens to generate.
Generate text using instruct-tuned Llama 3 70B.
prompt
string
Input prompt.
Number of choices to generate.
1
Sampling temperature to use. Higher values make the output more random, lower values make the output more deterministic.
Maximum number of tokens to generate.
Generate text with image input using FireLLaVA 13B.
prompt
string
Text prompt.
image_uris
array[string]
Image prompts.
Maximum number of tokens to generate.
800
Generate an image.
prompt
string
Text prompt.
Use "hosted" to return an image URL hosted on Substrate. You can also provide a URL to a registered file store. If unset, the image data will be returned as a base64-encoded string.
Generate multiple images.
prompt
string
Text prompt.
num_images
integer[1..8]
Number of images to generate.
2
Use "hosted" to return an image URL hosted on Substrate. You can also provide a URL to a registered file store. If unset, the image data will be returned as a base64-encoded string.
Edit an image using image generation.
image_uri
string
Original image.
prompt
string
Text prompt.
Mask image that controls which pixels are inpainted. If unset, the entire image is edited (image-to-image).
Use "hosted" to return an image URL hosted on Substrate. You can also provide a URL to a registered file store. If unset, the image data will be returned as a base64-encoded string.
Edit multiple images using image generation.
image_uri
string
Original image.
prompt
string
Text prompt.
Mask image that controls which pixels are edited (inpainting). If unset, the entire image is edited (image-to-image).
num_images
integer[1..8]
Number of images to generate.
2
Use "hosted" to return an image URL hosted on Substrate. You can also provide a URL to a registered file store. If unset, the image data will be returned as a base64-encoded string.
Generate an image using Stable Diffusion XL.
prompt
string
Text prompt.
Negative input prompt.
Number of diffusion steps.
30
num_images
integer[1..8]
Number of images to generate.
1
Use "hosted" to return an image URL hosted on Substrate. You can also provide a URL to a registered file store. If unset, the image data will be returned as a base64-encoded string.
Height of output image, in pixels.
1024
Width of output image, in pixels.
1024
Seeds for deterministic generation. Default is a random seed.
Higher values adhere to the text prompt more strongly, typically at the expense of image quality.
7
Generate an image using Stable Diffusion XL Lightning.
prompt
string
Text prompt.
Negative input prompt.
Number of images to generate.
1
Use "hosted" to return an image URL hosted on Substrate. You can also provide a URL to a registered file store. If unset, the image data will be returned as a base64-encoded string.
Height of output image, in pixels.
1024
Width of output image, in pixels.
1024
Seeds for deterministic generation. Default is a random seed.
Edit an image using Stable Diffusion XL. Supports inpainting (edit part of the image with a mask) and image-to-image (edit the full image).
image_uri
string
Original image.
prompt
string
Text prompt.
Mask image that controls which pixels are edited (inpainting). If unset, the entire image is edited (image-to-image).
num_images
integer[1..8]
Number of images to generate.
1
Resolution of the output image, in pixels.
1024
Negative input prompt.
Use "hosted" to return an image URL hosted on Substrate. You can also provide a URL to a registered file store. If unset, the image data will be returned as a base64-encoded string.
Controls the strength of the generation process.
0.8
Random noise seeds. Default is random seeds for each generation.
Generate an image with generation structured by an input image, using Stable Diffusion XL with ControlNet.
image_uri
string
Input image.
control_method
string
Strategy to control generation using the input image.
edge
depth
illusion
prompt
string
Text prompt.
num_images
integer[1..8]
Number of images to generate.
1
Resolution of the output image, in pixels.
1024
Negative input prompt.
Use "hosted" to return an image URL hosted on Substrate. You can also provide a URL to a registered file store. If unset, the image data will be returned as a base64-encoded string.
Controls the influence of the input image on the generated output.
0.5
Random noise seeds. Default is random seeds for each generation.
Generate an image with an image prompt, using Stable Diffusion XL with IP-Adapter.
prompt
string
Text prompt.
image_prompt_uri
string
Image prompt.
num_images
integer[1..8]
Number of images to generate.
1
Controls the influence of the image prompt on the generated output.
0.5
Negative input prompt.
Use "hosted" to return an image URL hosted on Substrate. You can also provide a URL to a registered file store. If unset, the image data will be returned as a base64-encoded string.
Width of output image, in pixels.
1024
Height of output image, in pixels.
1024
Random noise seeds. Default is random seeds for each generation.
Generate embedding for a text document.
text
string
Text to embed.
Vector store name.
Metadata that can be used to query the vector store. Ignored if collection_name
is unset.
Choose keys from metadata
to embed with text.
Vector store document ID. Ignored if store
is unset.
Selected embedding model.
jina-v2
clip
jina-v2
Generate embeddings for multiple text documents.
items
array[EmbedTextItem]
Items to embed.
text
string
Text to embed.
metadata
object
Metadata that can be used to query the vector store. Ignored if collection_name
is unset.
doc_id
string
Vector store document ID. Ignored if collection_name
is unset.
Vector store name.
Choose keys from metadata
to embed with text.
Selected embedding model.
jina-v2
clip
jina-v2
Generate embedding for an image.
image_uri
string
Image to embed.
Vector store name.
Vector store document ID. Ignored if collection_name
is unset.
Selected embedding model.
clip
Generate embeddings for multiple images.
items
array[EmbedImageItem]
Items to embed.
image_uri
string
Image to embed.
doc_id
string
Vector store document ID. Ignored if collection_name
is unset.
Vector store name.
Selected embedding model.
clip
Generate embeddings for multiple text documents using Jina Embeddings 2.
items
array[EmbedTextItem]
Items to embed.
text
string
Text to embed.
metadata
object
Metadata that can be used to query the vector store. Ignored if collection_name
is unset.
doc_id
string
Vector store document ID. Ignored if collection_name
is unset.
Vector store name.
Choose keys from metadata
to embed with text.
Generate embeddings for text or images using CLIP.
items
array[EmbedTextOrImageItem]
Items to embed.
image_uri
string
Image to embed.
text
string
Text to embed.
metadata
object
Metadata that can be used to query the vector store. Ignored if collection_name
is unset.
doc_id
string
Vector store document ID. Ignored if collection_name
is unset.
Vector store name.
Choose keys from metadata
to embed with text. Only applies to text items.
Create a vector store for storing and querying embeddings.
collection_name
string
Vector store name.
model
string
Selected embedding model.
jina-v2
clip
The max number of connections per layer for the index.
16
The size of the dynamic candidate list for constructing the index graph.
64
The distance metric to construct the index with.
cosine
l2
inner
inner
Delete a vector store.
collection_name
string
Vector store name.
model
string
Selected embedding model.
jina-v2
clip
Query a vector store for similar vectors.
collection_name
string
Vector store to query against.
model
string
Selected embedding model.
jina-v2
clip
Texts to embed and use for the query.
Image URIs to embed and use for the query.
Vectors to use for the query.
Document IDs to use for the query.
Number of results to return.
10
The size of the dynamic candidate list for searching the index graph.
40
Include the values of the vectors in the response.
false
Include the metadata of the vectors in the response.
false
Filter metadata by key-value pairs.
Fetch vectors from a vector store.
collection_name
string
Vector store name.
model
string
Selected embedding model.
jina-v2
clip
ids
array[string]
Document IDs to retrieve.
Update vectors in a vector store.
collection_name
string
Vector store name.
model
string
Selected embedding model.
jina-v2
clip
vectors
array[UpdateVectorParams]
Vectors to upsert.
id
string
Document ID.
vector
array[number]
Embedding vector.
metadata
object
Document metadata.
Delete vectors in a vector store.
collection_name
string
Vector store name.
model
string
Selected embedding model.
jina-v2
clip
ids
array[string]
Document IDs to delete.
Transcribe speech in an audio or video file.
audio_uri
string
Input audio.
Prompt to guide model on the content and context of input audio.
Segment the text into sentences with approximate timestamps.
false
Align transcription to produce more accurate sentence-level timestamps and word-level timestamps. An array of word segments will be included in each sentence segment.
false
Identify speakers for each segment. Speaker IDs will be included in each segment.
false
Suggest automatic chapter markers.
false
Generate speech from text.
text
string
Input text.
Use "hosted" to return an audio URL hosted on Substrate. You can also provide a URL to a registered file store. If unset, the audio data will be returned as a base64-encoded string.
Generate speech from text using XTTS v2.
text
string
Input text.
Reference audio used to synthesize the speaker. If unset, a default speaker voice will be used.
Language of input text. Supported languages: en, de, fr, es, it, pt, pl, zh, ar, cs, ru, nl, tr, hu, ko
.
en
Use "hosted" to return an audio URL hosted on Substrate. You can also provide a URL to a registered file store. If unset, the audio data will be returned as a base64-encoded string.
Remove the background from an image, with the option to return the foreground as a mask.
image_uri
string
Input image.
Return a mask image instead of the original content.
false
Hex value background color. Transparent if unset.
Use "hosted" to return an image URL hosted on Substrate. You can also provide a URL to a registered file store. If unset, the image data will be returned as a base64-encoded string.
Fill (inpaint) part of an image, e.g. to 'remove' an object.
image_uri
string
Input image.
mask_image_uri
string
Mask image that controls which pixels are inpainted.
Use "hosted" to return an image URL hosted on Substrate. You can also provide a URL to a registered file store. If unset, the image data will be returned as a base64-encoded string.
Upscale an image.
image_uri
string
Input image.
Use "hosted" to return an image URL hosted on Substrate. You can also provide a URL to a registered file store. If unset, the image data will be returned as a base64-encoded string.
Segment an image under a point and return the segment.
image_uri
string
Input image.
point
Point
Point prompt.
x
integer
X position.
y
integer
Y position.
Use "hosted" to return an image URL hosted on Substrate. You can also provide a URL to a registered file store. If unset, the image data will be returned as a base64-encoded string.
Segment an image using SegmentAnything.
image_uri
string
Input image.
Point prompts, to detect a segment under the point. One of point_prompts
or box_prompts
must be set.
x
integer
X position.
y
integer
Y position.
Box prompts, to detect a segment within the bounding box. One of point_prompts
or box_prompts
must be set.
x1
float
Top left corner x.
y1
float
Top left corner y.
x2
float
Bottom right corner x.
y2
float
Bottom right corner y.
Use "hosted" to return an image URL hosted on Substrate. You can also provide a URL to a registered file store. If unset, the image data will be returned as a base64-encoded string.