Skip to content

Conversation

@Benjaminhu
Copy link

Documentation: https://platform.openai.com/docs/api-reference/organizations-and-projects-optional

curl https://api.openai.com/v1/models \
  -H "Authorization: Bearer $OPENAI_API_KEY" \
  -H "OpenAI-Organization: org-lEOCXdqO48RKaa66ZdhPseo7" \
  -H "OpenAI-Project: $PROJECT_ID"
    ^^^^^^^^^^^^^^^^^^

If we are working on several projects, you can specify which of the given requests belong to:

$open_ai_key = getenv('OPENAI_API_KEY');
$open_ai = new OpenAi($open_ai_key);
$open_ai->setProject('<YOUR-PROJECT-ID>'); // `proj_XXX`

@Benjaminhu
Copy link
Author

@orhanerday What is needed to merge this small but useful feature?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant