Skip to Content
OpenAPI / Swagger

OpenAPI Specification

PickLayer generates an OpenAPI 3.0 specification for all end-user API endpoints. This specification can be used for API documentation, client SDK generation, and API testing.

Endpoints

EndpointDescription
GET /openapi/openapi.jsonOpenAPI 3.0 JSON specification
GET /openapi/uiSwagger UI for interactive API exploration

Accessing the Spec

The OpenAPI spec is publicly accessible (no authentication required):

# Fetch the OpenAPI spec curl https://api.picklayer.ai/openapi/openapi.json # Or with org/app context for custom domains curl https://api.mychatapp.com/openapi/openapi.json

OpenAI Compatibility

The generated spec documents PickLayer’s OpenAI-compatible endpoints:

PickLayer EndpointOpenAI EquivalentStatus
/v1/chat/completions/v1/chat/completionsFull compatibility
/v1/responses/v1/responsesFull compatibility
/v1/audio/speech/v1/audio/speechFull compatibility
/v1/audio/transcriptions/v1/audio/transcriptionsFull compatibility
/v1/images/generations/v1/images/generationsFull compatibility
/v1/files/v1/filesFull compatibility
/v1/models/v1/modelsExtended with provider grouping
/v1/videos/v1/videosFull compatibility (async)

PickLayer Extensions

The following endpoints are PickLayer-specific:

  • Auth (/v1/auth/*) - User authentication and registration
  • Billing (/v1/billing/*) - Subscription and payment management
  • Data (/v1/data/*) - User data storage
  • Videos (/v1/videos/*) - Video generation
  • Prompts (/v1/prompts/*) - Schema-enforced prompt invocation
  • Relay (/v1/relay/*) - External API proxying

Server URL Template

The spec includes a parameterized server URL:

https://{host}/api/org/{orgHandler}/app/{appHandler}/{env}

Variables:

  • host - API host (default: api.picklayer.ai)
  • orgHandler - Organization slug
  • appHandler - Application slug
  • env - Environment: dev, stage, or prod (default: prod)

SDK Generation

Use the OpenAPI spec to generate client SDKs in any language:

# Generate TypeScript client npx openapi-generator-cli generate \ -i https://api.picklayer.ai/openapi/openapi.json \ -g typescript-fetch \ -o ./generated/typescript # Generate Python client npx openapi-generator-cli generate \ -i https://api.picklayer.ai/openapi/openapi.json \ -g python \ -o ./generated/python # Validate the spec npx @redocly/cli lint https://api.picklayer.ai/openapi/openapi.json

Official SDKs

PickLayer also provides official SDKs with built-in support for all endpoints:

  • Python: pip install picklayer
  • TypeScript/Node.js: npm install @picklayer/sdk

Interactive Documentation

Visit /openapi/ui in your browser to explore the API interactively with Swagger UI:

https://api.picklayer.ai/openapi/ui

This provides:

  • Interactive request/response examples
  • Authentication testing
  • Schema exploration
  • Try-it-out functionality
Last updated on