Generate a package
Returns one generated package without creating a Project.
Supports idempotent retries; keyed responses include generated files in the replay cache.
Use download.url to save the complete ZIP, verify download.sha256, and extract it into an empty directory. The link expires at download.expires_at and grants access to anyone who has it. CLI, MCP, and SDK calls supply an idempotency key automatically. Agents should request fields=["download","coverage","warnings","claim"] to keep the MCP result compact; files can exceed the response limit. Download the ZIP instead of repeating generation to retrieve omitted files.
Anonymous and Free requests include the first 25 operations. Paid plans include all operations. Anonymous requests are rate limited by IP address. Check coverage for omitted operations; an invalid API key returns 401.
An anonymous URL request without source headers may return claim.url. Sign in through that link within seven days to save the recipe as a Project.
Authorization
apiKey Organization API key from the console (ak_...), or an OAuth access token with user:org:read, the organization selected during consent, and the capability required by the operation.
In: header
Header Parameters
Identifies one logical write for 24 hours. The key is scoped to the authenticated organization and operation; generation without an organization uses a hashed network identity. Retrying the same method, path, query, If-Match header, and JSON body replays the original response. Reusing the key with changed intent returns 409. After expiry the key starts a new write.
^[!-~]+$1 <= length <= 255Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/generate" \ -H "Content-Type: application/json" \ -d '{ "spec": { "url": "https://typeship.dev/examples/petstore/openapi.yaml" }, "target": { "type": "cli" } }'{ "object": "package", "files": [ { "path": "README.md", "content": "# petstore-cli\n\nCLI for Petstore. [API reference](./api.md)\n" } ], "warnings": [], "coverage": { "generated": 20, "omitted": 0, "total": 20, "omitted_operations": [] }, "request_id": "req_3k8m1v6q9p2d7h4c"}Get a File GET
Returns one bounded chunk of an immutable file: at most 24 KiB, as UTF-8 text or, for binary bytes, base64. When next_cursor is not null, repeat the request with cursor and concatenate the chunks in order. A file ID always returns the same bytes.
Download a generated package GET
Download the complete ZIP referenced by `packages_generate`'s `download.url`. Pass the token from that URL. No API key is needed; the token grants access only to that exact package until its replay window expires. Keep the token private. The local MCP server saves this binary response to disk. On a hosted MCP connection, download the original URL directly to your workspace. Verify the ZIP against `download.sha256` before extracting it into an empty directory. Expired or invalid tokens return `404`; a new generation creates a new download.