Correct api_key retrieval in specs