Get started
Quickstart
This guide runs a first render with a test key: the call is free and returns a sample image within a few seconds.
- Create an account and confirm your email address. In the console, create an organization, then a test key with the Renders and Read generations permissions. The key (
rt_test_…) is shown only once. - Store it in an environment variable, outside the source code:
export RENDERTHINK_API_KEY="rt_test_...". - Send a
POST /v1/rendersrequest with the public URL of a draft image (JPEG, PNG or WebP, 10 MB at most) and thequalityoutput resolution.
curl https://api.renderthink.com/v1/renders \-H "Authorization: Bearer $RENDERTHINK_API_KEY" \-H "Content-Type: application/json" \-d '{"image": "https://developers.renderthink.com/assets/scenes/sejour-charpente-export.webp", "quality": "2k"}'
The API responds when the generation ends. In live mode, this usually takes 1 to 3 minutes: set your HTTP client timeout to 5 minutes. In test mode, the generation succeeds in about 3 seconds and the API responds
200 (excerpt):json{"object": "generation","id": "gen_3Wd8KpQ2xLm7Vb9NcT4hRz","type": "render","status": "succeeded","livemode": false,"output": [{"url": "https://…","url_expires_at": 1791454515,"content_type": "image/webp","width": 1024,"height": 576}],"cost": { "amount": 23, "currency": "eur", "unit": "cents" }}
output[0].url is the URL of the output image, valid for 15 minutes; in test mode, it is a watermarked sample image. cost gives the price a live key would have charged. To send a local image, send the file in a multipart/form-data request (see Input images).To move to live mode, top up the balance and replace the key with an
rt_live_… key (see Test mode).- Generations: synchronous or background response, retrieval and cancellation.
- Input images: sending by URL or as a file, chaining generations.
- Errors: error format and list of codes.
- Idempotency: resend a creation request without risking a double charge.