-
Notifications
You must be signed in to change notification settings - Fork 41
3. API Guide
Fill 3D provides a public API for making generations in your own custom application:
All requests must be authenticated with an active Fill 3D API key. Generate your API key at fill3d.ai/fill:
[GIF here]
Provide your API key in the Authorization
header in all requests:
Authorization: Bearer <API KEY>
Important
You must purchase API credits to create generations using our API. Head over to fill3d.ai/fill and click on your user button to view your current balance.
Before generating images, you must first create a scene which contains relevant metadata about your image:
// POST https://www.fill3d.ai/api/scenes
{
"image": "<image URL>"
}
Below is the response payload:
// Response
{
"id": "<scene ID>",
"image": "<image URL>",
"renders": [],
"created": "2024-05-17T14:13:22+0000"
}
Note
Creating a scene takes between 20-30 seconds. Make sure to set your request timeout appropriately.
Next, generate an image by providing the scene ID along with a staging prompt:
// POST https://www.fill3d.ai/api/scenes/[id]/render
{
"prompt": "Place a dining table in the middle of the room"
}
Tip
See the Prompt Guide for tips on crafting high quality staging prompts.
Note
Generating an image takes between 40-70 seconds. Make sure to set your request timeout appropriately.