Disclaimer: Better documentation for these is being worked on at the moment. Here is what we have for now:
Layer API
Pro and above plans allow users to generate access tokens for the api.
You can access Layer API via this link:
Create your API token:
Workspace Settings> Access tokens> Create Token
API Pricing: in progress
Our API documentation will be worked on later in Q4, until then we'd be happy to support you if you reached out via intercom. In the meantime here is an example query to generate something with a style:
mutation CreateInference($createInferenceInput: CreateInferenceInput!) { createInference(input: $createInferenceInput) { __typename ... on Inference { id status files { __typename id url } } ... on Error { code message } } }
And example inputs:
β
{ "createInferenceInput": { "sync": true, "parameters": { "batchSize": 4, "generationType": "CREATE", "guidanceScale": 6, "width": 1024, "height": 1024, "numInferenceSteps": 20, "prompt": "cat", "styles": [ { "id": "92656826-0e18-4f81-919e-e30655685cac", "weight": 1 } ] }, "workspaceId": "9602107e-865b-47e5-b66e-87b1bec5e3d5" } }
In this example the style id here is "Flux Dev" and the workspace id is our own workspace on Layer - users can get these values either by making other API calls or by opening Chrome dev tools and observing what our UI does.
The UI uses the exact same API - https://api.app.layer.ai/
Layer Unity Plugin
Got questions or feedback? Please reach out via Intercom app.