export OPENAI_API_KEY="sk-..."
? Or os.environ["OPENAI_API_KEY"] = "sk-..."
? Maybe do both?from llama_index.embeddings import OpenAIEmbedding from llama_index import set_global_service_context embed_model = OpenAIEmbedding(api_key=...) service_context = ServiceContext.from_defaults(embed_model=embed_model) set_global_service_context(service_context)