Generate a package from a spec
Stateless generation: nothing is stored. Returns the full generated package as files. Works without an API key: anonymous calls generate the first 25 operations, rate limited per IP address, and the response's `limits` object says what was held back and where to lift it; anonymous calls from a spec URL also carry `claim.url`, a link that turns the run into a project once a person signs in. With a key, the free plan generates the first 25 operations and paid plans generate the whole spec. A present but invalid key is a 401, not a downgrade to anonymous.
Stateless generation: nothing is stored. Returns the full generated
package as files. Works without an API key: anonymous calls generate
the first 25 operations, rate limited per IP address, and the
response's limits object says what was held back and where to lift
it; anonymous calls from a spec URL also carry claim.url, a link
that turns the run into a project once a person signs in. With a key, the free plan generates the first 25 operations and
paid plans generate the whole spec. A present but invalid key is a
401, not a downgrade to anonymous.
Authorization
apiKey API key from the console, ak_....
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/generate" \ -H "Content-Type: application/json" \ -d '{ "spec": {} }'{ "files": [ { "path": "string", "content": "string" } ], "warnings": [ "string" ], "meta": { "title": "string", "version": "string", "spec_format": "openapi", "oas_version": "string", "converted": true, "package_name": "string", "client_name": "string", "targets": [ "sdk" ], "resource_count": 0, "operation_count": 0, "schema_count": 0, "paginated_operation_count": 0, "omitted_operation_count": 0, "pr_url": "string", "pr_number": 0, "changelog": "string", "breaking_count": 0, "baseline": "destination", "semver": "success", "semver_note": "string", "previous_version": "string", "file_count": 0, "total_lines": 0 }, "limits": { "max_operations": 0, "omitted_operations": 0, "reason": "anonymous", "signup_url": "string", "upgrade_url": "string" }, "claim": null}