typefile
{
"image": "https://replicate.delivery/pbxt/JcqDxAZJWep7WsZdWM0gc6Ead2ie0YDEXyemc9HXogSdpsOM/out-0%20%281%29.png",
"text": "What makes this image special?"
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_HyX**********************************
This is your API token. Keep it to yourself.
import Replicate from "replicate";
const replicate = new Replicate({
auth: process.env.REPLICATE_API_TOKEN,
});
Run cjwbw/internlm-xcomposer using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"cjwbw/internlm-xcomposer:d16df299dbe3454023fcb47ed48dbff052e9b7cdf2837707adff3581edd11e95",
{
input: {
image: "https://replicate.delivery/pbxt/JcqDxAZJWep7WsZdWM0gc6Ead2ie0YDEXyemc9HXogSdpsOM/out-0%20%281%29.png",
text: "What makes this image special?"
}
}
);
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_HyX**********************************
This is your API token. Keep it to yourself.
import replicate
Run cjwbw/internlm-xcomposer using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"cjwbw/internlm-xcomposer:d16df299dbe3454023fcb47ed48dbff052e9b7cdf2837707adff3581edd11e95",
input={
"image": "https://replicate.delivery/pbxt/JcqDxAZJWep7WsZdWM0gc6Ead2ie0YDEXyemc9HXogSdpsOM/out-0%20%281%29.png",
"text": "What makes this image special?"
}
)
print(output)
To learn more, take a look at the guide on getting started with Python.
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_HyX**********************************
This is your API token. Keep it to yourself.
Run cjwbw/internlm-xcomposer 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": "cjwbw/internlm-xcomposer:d16df299dbe3454023fcb47ed48dbff052e9b7cdf2837707adff3581edd11e95",
"input": {
"image": "https://replicate.delivery/pbxt/JcqDxAZJWep7WsZdWM0gc6Ead2ie0YDEXyemc9HXogSdpsOM/out-0%20%281%29.png",
"text": "What makes this image special?"
}
}' \
https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
This image is special because it depicts an astronaut sitting in a chair surrounded by psychedelic mushrooms. The astronaut is wearing an orange spacesuit, which adds to the surreal and dreamlike atmosphere of the scene. The combination of the astronaut and the psychedelic mushrooms creates a unique and captivating composition.
{
"id": "7s4rnulbxfzswyq2cc6n223fwi",
"model": "cjwbw/internlm-xcomposer",
"version": "d16df299dbe3454023fcb47ed48dbff052e9b7cdf2837707adff3581edd11e95",
"input": {
"image": "https://replicate.delivery/pbxt/JcqDxAZJWep7WsZdWM0gc6Ead2ie0YDEXyemc9HXogSdpsOM/out-0%20%281%29.png",
"text": "What makes this image special?"
},
"logs": "",
"output": "This image is special because it depicts an astronaut sitting in a chair surrounded by psychedelic mushrooms. The astronaut is wearing an orange spacesuit, which adds to the surreal and dreamlike atmosphere of the scene. The combination of the astronaut and the psychedelic mushrooms creates a unique and captivating composition.\n",
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2023-10-01T20:24:35.494781Z",
"started_at": "2023-10-01T20:24:35.483529Z",
"completed_at": "2023-10-01T20:24:45.424113Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/7s4rnulbxfzswyq2cc6n223fwi/cancel",
"get": "https://api.replicate.com/v1/predictions/7s4rnulbxfzswyq2cc6n223fwi"
},
"metrics": {
"predict_time": 9.940584,
"total_time": 9.929332
}
}