typetext
{
"max_length": 150,
"prompt": "original prompt: garden with flowers and dna strands\nimproved prompt: psychedelic 3d vector art illustration of garden full of colorful double helix dna strands and exotic flowers by lisa frank, beeple and tim hildebrandt, hyper realism, art deco, intricate, elegant, highly detailed, unreal engine, octane render, smooth\n\noriginal prompt: humanoid plant monster\nimproved prompt: ",
"repetition_penalty": 1,
"temperature": 0.75,
"top_p": 1
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_U3P**********************************
This is your API token. Keep it to yourself.
import Replicate from "replicate";
const replicate = new Replicate({
auth: process.env.REPLICATE_API_TOKEN,
});
Run meta/llama-2-70b using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"meta/llama-2-70b:14ce4448d5e7e9ed0c37745ac46eca157aab09061f0c179ac2b323b5de56552b",
{
input: {
max_length: 150,
prompt: "original prompt: garden with flowers and dna strands\nimproved prompt: psychedelic 3d vector art illustration of garden full of colorful double helix dna strands and exotic flowers by lisa frank, beeple and tim hildebrandt, hyper realism, art deco, intricate, elegant, highly detailed, unreal engine, octane render, smooth\n\noriginal prompt: humanoid plant monster\nimproved prompt: ",
repetition_penalty: 1,
temperature: 0.75,
top_p: 1
}
}
);
console.log(output);
To learn more, take a look at the guide on getting started with Node.js.
pip install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_U3P**********************************
This is your API token. Keep it to yourself.
import replicate
Run meta/llama-2-70b using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"meta/llama-2-70b:14ce4448d5e7e9ed0c37745ac46eca157aab09061f0c179ac2b323b5de56552b",
input={
"max_length": 150,
"prompt": "original prompt: garden with flowers and dna strands\nimproved prompt: psychedelic 3d vector art illustration of garden full of colorful double helix dna strands and exotic flowers by lisa frank, beeple and tim hildebrandt, hyper realism, art deco, intricate, elegant, highly detailed, unreal engine, octane render, smooth\n\noriginal prompt: humanoid plant monster\nimproved prompt: ",
"repetition_penalty": 1,
"temperature": 0.75,
"top_p": 1
}
)
# The meta/llama-2-70b model can stream output as it's running.
# The predict method returns an iterator, and you can iterate over that output.
for item in output:
# https://replicate.com/meta/llama-2-70b/api#output-schema
print(item, end="")
To learn more, take a look at the guide on getting started with Python.
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_U3P**********************************
This is your API token. Keep it to yourself.
Run meta/llama-2-70b using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
curl -s -X POST \
-H "Authorization: Bearer $REPLICATE_API_TOKEN" \
-H "Content-Type: application/json" \
-H "Prefer: wait" \
-d $'{
"version": "meta/llama-2-70b:14ce4448d5e7e9ed0c37745ac46eca157aab09061f0c179ac2b323b5de56552b",
"input": {
"max_length": 150,
"prompt": "original prompt: garden with flowers and dna strands\\nimproved prompt: psychedelic 3d vector art illustration of garden full of colorful double helix dna strands and exotic flowers by lisa frank, beeple and tim hildebrandt, hyper realism, art deco, intricate, elegant, highly detailed, unreal engine, octane render, smooth\\n\\noriginal prompt: humanoid plant monster\\nimproved prompt: ",
"repetition_penalty": 1,
"temperature": 0.75,
"top_p": 1
}
}' \
https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
3d vector art illustration of a humanoid plant monster with green skin and vivid colorful paisley patterned leaves, glowing red eyes and sharp teeth, hyper realism, art deco
{
"id": "ych5notb3equzn55em4gl24tl4",
"model": "meta/llama-2-70b",
"version": "14ce4448d5e7e9ed0c37745ac46eca157aab09061f0c179ac2b323b5de56552b",
"input": {
"max_length": 150,
"prompt": "original prompt: garden with flowers and dna strands\nimproved prompt: psychedelic 3d vector art illustration of garden full of colorful double helix dna strands and exotic flowers by lisa frank, beeple and tim hildebrandt, hyper realism, art deco, intricate, elegant, highly detailed, unreal engine, octane render, smooth\n\noriginal prompt: humanoid plant monster\nimproved prompt: ",
"repetition_penalty": 1,
"temperature": 0.75,
"top_p": 1
},
"logs": "",
"output": [
"3d",
" vector",
" art",
" illustration",
" of",
" a",
" humanoid",
" plant",
" monster",
" with",
" green",
" skin",
" and",
" vivid",
" colorful",
" paisley",
" patterned",
" leaves,",
" glowing",
" red",
" eyes",
" and",
" sharp",
" teeth,",
" hyper",
" realism,",
" art",
" deco"
],
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2023-07-21T05:03:07.710929Z",
"started_at": "2023-07-21T05:03:07.789492Z",
"completed_at": "2023-07-21T05:03:16.263188Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/ych5notb3equzn55em4gl24tl4/cancel",
"get": "https://api.replicate.com/v1/predictions/ych5notb3equzn55em4gl24tl4"
},
"metrics": {
"predict_time": 8.473696,
"total_time": 8.552259
}
}