Assistants and integrations
REST API: key, quote and job
The API lets your script or shop check a price, order a generation and download the finished file.
- In the app open Account and create an API key.
- Get the model list and pick an ID.
- Get a quote. Quotes are free.
- Create a job and check its status.
- Download the finished file.
curl https://kinvid.app/v1/models -H "Authorization: Bearer $KINVID_API_KEY"
curl https://kinvid.app/v1/quote -H "Authorization: Bearer $KINVID_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"MODEL_ID","prompt":"..."}'
curl https://kinvid.app/v1/jobs -H "Authorization: Bearer $KINVID_API_KEY" \
-H "Content-Type: application/json" -H "Idempotency-Key: order-1" \
-d '{"model":"MODEL_ID","prompt":"..."}'
curl https://kinvid.app/v1/jobs/JOB_ID/file -H "Authorization: Bearer $KINVID_API_KEY" -o resultThe Idempotency-Key header protects you from a double order when you repeat the same request. A failed job returns the credits.
