Class: OpenAI::Resources::ContentProvenanceChecks

Inherits:
Object
  • Object
show all
Defined in:
lib/openai/resources/content_provenance_checks.rb,
sig/openai/resources/content_provenance_checks.rbs

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ ContentProvenanceChecks

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of ContentProvenanceChecks.

Parameters:



41
42
43
# File 'lib/openai/resources/content_provenance_checks.rb', line 41

def initialize(client:)
  @client = client
end

Instance Method Details

#create(file:, request_options: {}) ⇒ OpenAI::Models::ContentProvenanceCheck

Check whether an image or audio file contains known OpenAI provenance signals. Learn more about content provenance.

If not_detected, it means the tool did not find supported signals in the uploaded file. The content could still have been generated by OpenAI if the metadata was stripped or has evidence of tampering, the watermark was degraded, it comes from a legacy generation model, or it was created before provenance signals were available. Content could also still be AI-generated by another company's model, which the tool currently does not detect.

Parameters:

  • file (Pathname, StringIO, IO, String, OpenAI::FilePart)

    The image or audio file to check for supported OpenAI provenance signals.

  • request_options (OpenAI::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

See Also:



25
26
27
28
29
30
31
32
33
34
35
36
# File 'lib/openai/resources/content_provenance_checks.rb', line 25

def create(params)
  parsed, options = OpenAI::ContentProvenanceCheckCreateParams.dump_request(params)
  @client.request(
    method: :post,
    path: "content_provenance_checks",
    headers: {"content-type" => "multipart/form-data"},
    body: parsed,
    model: OpenAI::ContentProvenanceCheck,
    security: {bearer_auth: true},
    options: options
  )
end