Tech Tip: Understanding OpenAI API Key Formats in 4D AIKit
PRODUCT: 4D | VERSION: 20 R | PLATFORM: Mac & Win
Published On: October 27, 2025
When integrating OpenAI with 4D AIKit, you may encounter two different API key formats. Understanding their structure and compatibility ensures proper authentication and error-free integration.
Key Types and Their Scope
Project-scoped keys provide better access control and resource isolation. They are recommended unless organization-wide access is specifically required.
Key Types and Their Scope
User-Level Keys (sk-...)
- Format: sk- + 48 alphanumeric characters
- Scope: Organization-wide access to all projects and resources
- Status: Legacy format, being phased out since April 2024
- Best for: Single project setups or when you need access across multiple projects
Project-Scoped Keys (sk-proj-...)
- Format: sk-proj- + alphanumeric string (~130-160 chars)
- Scope: Limited to a specific project and its resources only
- Status: Current standard for new OpenAI accounts
- Best for: Multi-project organizations with isolated resources and separate usage tracking
Project-scoped keys provide better access control and resource isolation. They are recommended unless organization-wide access is specifically required.